From: Gert Wollny Date: Mon, 6 Aug 2018 11:54:22 +0000 (+0200) Subject: New upstream version 3.6.3 X-Git-Tag: archive/raspbian/3.6.9-4+rpi1^2~26^2~9 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=02792b5c409e9b62062da486afe971020c219a54;p=dcmtk.git New upstream version 3.6.3 --- diff --git a/ANNOUNCE b/ANNOUNCE index 08163653..3c38b34e 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,10 +1,10 @@ ANNOUNCEMENT -Version 3.6.2 of the OFFIS DCMTK (DICOM ToolKit) software is now available for -public release. This release includes the following main changes over the -previous version 3.6.0: +Version 3.6.3 of the OFFIS DCMTK (DICOM ToolKit) software is now available for +public release. This is a minor release that includes the following changes +over the previous version 3.6.2: -- DCMTK 3.6.2 builds correctly on older and up-to-date versions of GNU gcc +- DCMTK 3.6.3 builds correctly on older and up-to-date versions of GNU gcc (4.2.1 to 7.1.1) Clang (3.4.1 to 4.0.1), Microsoft Visual Studio (2005 to 2017) and SunPro CC (5.14 and 5.15). @@ -18,308 +18,82 @@ previous version 3.6.0: - NetBSD on x86_64 - OpenBSD on x86_64 - OpenIndiana on x86 - - QNX on x86 - Solaris on x86 - Windows (and MinGW) on x86_64 and x86 For a complete list of tested systems and compilers, see the INSTALL file. -- The CMake build system is now considered as mature as our GNU Autoconf - setup. There are even some features that are only available when using CMake, - for example exporting the build configuration in order to easily integrate - DCMTK into other CMake based projects. - -- It is now possible to build shared libraries (Linux) resp. dynamic link - libraries (DLLs, Windows) using CMake and the "BUILD_SHARED_LIBS" option. - DCMTK can even be compiled into a single shared library (e.g. "dcmtk.dll") - using the "BUILD_SINGLE_SHARED_LIBRARY" option. - -- Added character set transcoding support: - - - Support for converting DICOM files, datasets and element values between - different character sets (incl. code extension techniques). - - Windows-specific support for converting between wide character encoding and - e.g. UTF-8 or Latin-1. - - Support for wide character strings (UTF-16) used for filenames by the - Windows operating system. - - Supports replacing the underlying character set conversion implementation as - needed using either: - - GNU libiconv, - - International Components for Unicode (ICU) or - - the iconv functions from the C standard library. - - "dcmqrdb" allows matching queries with datasets using different character - sets and response conversion. - -- Integrated a unit test framework and added several unit tests to ensure that - basic functionality (e.g. parsing DICOM data, network transmission) will - never break. - -- Updated CharLS to version 1.0 and log4cplus to version 1.1.0. - -- Added cross compiling support for Windows and Android targets. The Android - emulator and Wine have been integrated into our CMake setup for running the - run time configuration tests as required and (optionally) the unit tests. - -- Refactored native STL integration: - - - Added arguments resp. variables to Autoconf and CMake replacing the old - macros for choosing whether to use DCMTK's fallback or the native - implementation of various STL features. See the INSTALL file for more - information about this. - - Added configuration tests ensuring that the enabled STL features work as - expected/required before actually using them. - - Added unit tests to ensure whichever chosen implementation actually works. - -- Added support for several C++11 (and newer) features and fallback - implementations as required: - - - Added arguments resp. variables to Autoconf and CMake for enabling native - C++11 support or DCMTK's own fallback implementations and workarounds. See - the INSTALL file for more information. - - Added configuration tests that ensure that the compiler actually provides - C++11 support before using it. - - Added advanced memory management primitives OFunique_ptr and OFshared_ptr - to support users in writing memory leak free code. - - Added support for move semantics, e.g. to transfer the ownership of an - OFunique_ptr. - - Added OFnumeric_limits to query information about fundamental arithmetic - types. - - Added type traits (OFenable_if etc.) to support template meta-programing. - - Added OFtuple as a more generic alternative to OFPair. - - Added OFoptional to connect the state information of optional values with - the actual value, e.g. for being used as function return value. - - Added OFvariant, a type safe tagged union to store different objects in - a single variable (not simultaneously) depending on runtime requirements. - - Added unit tests to ensure all above mentioned features really work. - -- Introduced platform independent defines for suppressing inappropriate compiler - diagnostic output (i.e. "warnings"). This mechanism is used to locally - suppress warnings that originate from the compiler misinterpreting the authors - intention, e.g. warnings when intentionally mixing "class" and "struct" for - template specialization to save typing "public" and "private". - -- Introduced several new modules: - - - "dcmrt" - implements support for the DICOM Radiation Therapy IODs - - "dcmiod" - eases IOD module composition and supports constraint checking - when reading and writing IODs and their modules. - - "dcmfg" - allows to represent Functional Groups in the source code. - - "dcmseg" - implements the segmentation IOD based on "dcmiod" and "dcmfg". - - "dcmtract" - offers a dedicated API to create and read DICOM Tractography - Results objects (introduced in DICOM Supplement 181). - - "dcmpmap" - for creating, saving and loading DICOM Parametric Maps objects - (introduced with Supplement 172). +- GNU Autoconf has been deprecated, running 'configure' will now emit a + warning by default. -- Further enhanced DICOM Structured Reporting (SR) module "dcmsr": - - - Added the "dcmsr/cmr" submodule implementing support for parts of the DICOM - Content Mapping Resource (DCMR). - - Added support for SR templates by introducing two general classes for root - and non-root templates. - - Also added support for CP-1031 (Support long code values) and CP-1417 - (Clarify use and declaration of private mapping resource). - - Added support for the SR Template TID 1500 (Measurement Report) and included - subordinated Templates (e.g. TID 1001, 1204, 1600, 1411). - - Also added support for all required Context Groups and Code definitions, i.e. - from DICOM, NCIt, SNOMED, UCUM, and UMLS coding scheme. - - Added support for the new Acquisition Context SR IOD, Comprehensive 3D SR - IOD, Implantation Plan SR Document IOD, Radiopharmaceutical Radiation Dose - SR IOD, Simplified Adult Echo SR IOD and Spectacle Prescription Report IOD. - - Further improved handling of incorrectly encoded DICOM SR documents. - - Many further improvements in order to stay up-to-date with development of - the DICOM standard and to make it easier to create, read, write, and modify - SR documents. - -- Introduced several new command line tools: - - - "getscu" - a C-GET Service Class User. - - "dcmsend" - a Simple Storage Service Class User, based on new class - "DcmStorageSCU". - - "dcmrecv" - alternative to storescp with focus on easy use, based on new - class "DcmStorageSCP". - - "dcm2json" - converts DICOM files to DICOM's official JSON encoding. - -- Added threading functionality to DcmSCP via thread pool classes. - -- Added new output format to dcm2xml: the Native DICOM Model according to - part 19 of the DICOM standard ("Application Hosting"). - -- Added support for 16 bits per sample to PNG image export. +- Updated data dictionary, SOP Class and Transfer Syntax UIDs for the recently + approved changes to the DICOM standard (i.e. Supplements and CPs), up to DICOM + standard release DICOM 2017e. -- Significantly enhanced performance of the DICOMDIR code for reading and - writing such files. Also added support for all new Directory Record Types. +- Updated automatically generated classes in module "dcmrt" (Radiotherapy) and + "dcmsr" (Structured Reporting) based on DICOM 2017e. Also updated the Code + definitions from the supported coding schemes such as DICOM, NCIt and UMLS. -- Added support for new Return Key Attributes to the "wlmscpfs", which are - required for the IHE Eye Care Workflow. +- Further enhanced DICOM Structured Reporting (SR) module "dcmsr": -- Introduced advanced parameterization methods for DCMTLS. + - Added support for the Patient Radiation Dose SR IOD (Supplement 191). -- Improved data dictionary configuration options and handling. + - Added support for further sub-templates to the existing class for TID 1500 + (Measurement Report), e.g. TID 300 (Measurement). -- Added support for new Value Representations "Other Double" (OD), "Other Long" - (OL), "Unlimited Characters" (UC) and "Universal Resource Identifiers/Locators - (URI/URL)" (UR). + - Enhanced support for image entry descriptors in TID 1600 (Image Library), + e.g. by adding a new method that allows for moving common image entry + descriptors automatically to their respective image group. -- Added support for three new DICOS Storage SOP Classes from the DICOM-related - DICOS (Digital Imaging and Communications in Security) standard. + - Added new method that allows for adding extra content items to extensible + SR templates. -- Added additional matching keys to dcmqrdb and dcmwlm: StudyDate, StudyTime and - IssuerOfPatientID. + - Further enhanced iterating an SR document tree, e.g. by providing a new + filter mechanism that allows for matching document tree nodes based on a + variety of properties like value type and concept name. -- Updated data dictionary, SOP Class and Transfer Syntax UIDs for the recently - approved changes to the DICOM standard (i.e. Supplements and CPs), up to DICOM - standard release DICOM 2017b. + - Added another gotoNode() method to tree and cursor class, which searches for + a particular tree node by its value. -- Added support for additional MPEG4 transfer syntaxes to several command line - programs. + - Added "equal" and "not equal" comparison operators to all document tree node + and underlying value classes as well as to the wrapper class for "SR content + items". -- Enhanced support for DICOM Non-Patient Objects, e.g. allow for transferring - them using the standard networking tools. + - Updated mapping of the Defined Terms for Body Part Examined in the class + that implements CID 4031 (Common Anatomic Regions) based on DICOM 2017e. -- DCMTK now supports compiling with OpenSSL 1.1.x; support for some older, - insecure TLS cipher suites has been removed. + - Many further improvements in order to stay up-to-date with development of + the DICOM standard and to make it easier to use this module and its classes. -- The JPEG encoder now implements DICOM CP 1447, i.e. always writes a SOF1 - marker into the JPEG bitstream in extended sequential mode. +- Added options to findscu that extract the C-FIND response datasets to XML + files (either a single file with all responses or separate files for each + response, similar to the existing --extract option). -- The socket timeout used for send() and recv() is now configurable (at - runtime); further fixes and enhancements to networking basics. +- Added option --socket-timeout to echoscu (same as for e.g. storescu). -- Revised implementation of class OFCondition in order to avoid issues with - static initialization order. +- Consistently use the default value "MEDIUM" for Priority in all DIMSE request + messages, i.e. for C-STORE, C-FIND, C-GET and C-MOVE. -- Fixed various issues that occurred after the official 3.6.0 release. +- Fixed various issues that occurred after the official 3.6.2 release. Many people have contributed to this new release of DCMTK, appearing here in alphabetical order. Thank you very much for your support! - Alexander Haderer - Alexander Karaivanov - Andrei Terechko - Andrey Fedorov - Anne-Gaelle Berge - Bhuvan Bose - Bill Lorensen - Brad Jascob - Bruno Milutin - Carmen Avram - Christian Fremgen - Christian Herz - Christian Wetzel - Daniele Giunchi - David Clunie - Detlev Hohmeier - Dimitri Papadopoulos - Dr. Martin Korp - Dr. Michael Heber - Eric A. Borisch - David Flade - Fred Stegemann - Fu Peng - Gareth Sylvester-Bradley - Gary Carter - Gigante - Grzegorz Chlebus - Hanno Hugenberg - Hans J. Johnson - Hans Kluijtmans - Hector Marco - Heyo Spekker - Hüseyin Kozan - Ing-Long Eric Kuo + Domen Soklic + GwanYeong Kim Jean-Christophe Fillion-Robin - Jeroen Eggermont - John Stark - Julien Finet - Kent Williams - Kornelius Sohn - Lin Qi Ruan - Marco Nolden - Mario Ceresa - Markus Konrad - Markus Mertens - Martin Wenger - Mathieu Malaterre - Matt McCormick - Michael Knopke - Michael Schinner - Michal Spacek - Niels Dekker - Paolo Marcheschi - Per Inge Mathisen - Peter Hille + Joerg Koenig + Michael Craggs Peter Klotz - Pietro Cerutti - Rasmus Christian Pedersen - Richard Flay - Robert Habrich - Stacy Loesch - Takeo Satomi - Tamas Nemeth - Thomas Puckett - Thomas Sondergaard - Tiago D'Agostini - Tilman Vogel - Timothy Pitt - Waldir Pimenta - Wang Qiang - Yves Neumann - - Forum user "AlexanderLysenko" - Forum user "andreasb" - Forum user "angad" - Forum user "aprogrammer" - Forum user "bibble_235" - Forum user "budric" - Forum user "chaircrusher" - Forum user "coach4ae" - Forum user "dimitri" - Forum user "flang" - Forum user "Geof" - Forum user "gerhardh" - Forum user "ghleclerc" - Forum user "HackerNeo" - Forum user "henry" - Forum user "Hua Cong Danh" - Forum user "ichimura.t" - Forum user "ionut.vaida" - Forum user "jacobf" - Forum user "jacobscolin" - Forum user "jakecobb" - Forum user "kosborn" - Forum user "kron24" - Forum user "lars_matthaeus" - Forum user "Luuk" - Forum user "maleike" - Forum user "martinrame" - Forum user "Matterhorn" - Forum user "merlin" - Forum user "michael12345" - Forum user "nikkoara" - Forum user "nmoraes" - Forum user "oblivion81" - Forum user "oxymoron" - Forum user "Paul Groot" - Forum user "Per" - Forum user "poupofa" - Forum user "psih128" - Forum user "Rich in Soquel" + + Helmut Steiner + Max Smolens + Martin Strunz + Sergei Khlutchin + + Forum user "Hafiz Rafeeq" Forum user "sfzhang" - Forum user "Shaeto" - Forum user "spasmous" - Forum user "st80rules" - Forum user "Tim" - Forum user "tpalagyi" - Forum user "vlad" - Forum user "vsalomoni" - Forum user "wollet88" - Forum user "wrenashe" - Forum user "xcoder" - Forum user "ymartelli" - Forum user "yueran" - Forum user "Yves Neumann" - Forum user "zaq" Members of the DCMTK Team who have worked on this release are (in alphabetical order): @@ -333,8 +107,6 @@ Student associates: Nikolas Goldhammer Sebastian Grallert - Thorben Hasenpusch - Uli Schlachter Also see CREDITS file for projects and companies who have been generously supporting DCMTK. @@ -343,4 +115,4 @@ The DCMTK software can be downloaded via: http://dicom.offis.de/dcmtk or http://www.dcmtk.org/ -OFFIS e.V., Oldenburg, Germany, 2017-07-14 +OFFIS e.V., Oldenburg, Germany, 2018-02-05 diff --git a/CMake/3rdparty.cmake b/CMake/3rdparty.cmake index 8caa1d91..cbbff906 100644 --- a/CMake/3rdparty.cmake +++ b/CMake/3rdparty.cmake @@ -86,7 +86,8 @@ IF(WIN32 AND NOT MINGW) SET(OPENSSL_BINDIR "${WITH_OPENSSLINC}/bin") SET(OPENSSL_INCDIR "${WITH_OPENSSLINC}/include") SET(OPENSSL_LIBDIR "${WITH_OPENSSLINC}/lib") - SET(OPENSSL_LIBS debug "${OPENSSL_LIBDIR}/dcmtkssl_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkssl_o.lib" debug "${OPENSSL_LIBDIR}/dcmtkcrypto_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkcrypto_o.lib") + # starting with OpenSSL 1.1.0, the Windows crypt32 library is needed for a static link of OpenSSL. + SET(OPENSSL_LIBS "crypt32" debug "${OPENSSL_LIBDIR}/dcmtkssl_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkssl_o.lib" debug "${OPENSSL_LIBDIR}/dcmtkcrypto_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkcrypto_o.lib") MESSAGE(STATUS "Info: DCMTK OPENSSL support will be enabled") SET(WITH_OPENSSL 1) ELSE(WITH_OPENSSLINC) # turn off library if library path not set diff --git a/CMake/CTest/dcmtkCTestRun.cmake.in b/CMake/CTest/dcmtkCTestRun.cmake.in index 603f7266..67bd4a44 100644 --- a/CMake/CTest/dcmtkCTestRun.cmake.in +++ b/CMake/CTest/dcmtkCTestRun.cmake.in @@ -7,7 +7,7 @@ SET(ENV{DCMDICTPATH} "@DCMDICTPATH@") EXECUTE_PROCESS(COMMAND - "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" + "${DCMTK_CTEST_TESTCASE_COMMAND}" $ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" RESULT_VARIABLE RESULT ) diff --git a/CMake/CTest/dcmtkCTestRunAndroid.cmake.in b/CMake/CTest/dcmtkCTestRunAndroid.cmake.in index 819fd318..9e2632d0 100644 --- a/CMake/CTest/dcmtkCTestRunAndroid.cmake.in +++ b/CMake/CTest/dcmtkCTestRunAndroid.cmake.in @@ -21,7 +21,7 @@ SET(DCMTK_ANDROID_EMULATOR_INSTANCE "$ENV{DCMTK_ANDROID_EMULATOR_INSTANCE}") # Run the actual testcase on the remote device DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE - COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" "DCMDICTPATH=${DCMDICTPATH}" "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" + COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" "DCMDICTPATH=${DCMDICTPATH}" "${DCMTK_CTEST_TESTCASE_COMMAND}" $ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" WORKING_DIRECTORY "${ANDROID_TEMPORARY_FILES_LOCATION}" RESULT_VARIABLE RESULT ) diff --git a/CMake/CTest/dcmtkCTestRunExhaustive.cmake b/CMake/CTest/dcmtkCTestRunExhaustive.cmake index 0c726368..06419f33 100644 --- a/CMake/CTest/dcmtkCTestRunExhaustive.cmake +++ b/CMake/CTest/dcmtkCTestRunExhaustive.cmake @@ -3,4 +3,4 @@ # SET(ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "-x") -EXECUTE_PROCESS(COMMAND ${CMAKE_CTEST_COMMAND}) +EXECUTE_PROCESS(COMMAND ${CMAKE_CTEST_COMMAND} -C "${CONFIG}") diff --git a/CMake/CTest/dcmtkCTestRunWine.cmake.in b/CMake/CTest/dcmtkCTestRunWine.cmake.in index e0e9a439..4dc0d783 100644 --- a/CMake/CTest/dcmtkCTestRunWine.cmake.in +++ b/CMake/CTest/dcmtkCTestRunWine.cmake.in @@ -12,7 +12,7 @@ SET(ENV{DCMDICTPATH} "@DCMDICTPATH@") SET(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@") EXECUTE_PROCESS(COMMAND - "${WINE_WINE_PROGRAM}" "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" + "${WINE_WINE_PROGRAM}" "${DCMTK_CTEST_TESTCASE_COMMAND}" $ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" RESULT_VARIABLE RESULT ) diff --git a/CMake/GenerateDCMTKConfigure.cmake b/CMake/GenerateDCMTKConfigure.cmake old mode 100755 new mode 100644 index 19fb179a..d811a582 --- a/CMake/GenerateDCMTKConfigure.cmake +++ b/CMake/GenerateDCMTKConfigure.cmake @@ -134,10 +134,10 @@ IF(WIN32 AND NOT CYGWIN) SET(ENVIRONMENT_PATH_SEPARATOR ";") # Set dictionary path to the data dir inside install main dir (prefix) IF(DCMTK_ENABLE_EXTERNAL_DICTIONARY) - SET(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}\\\\${DCMTK_INSTALL_DATDIR}\\\\dicom.dic") + SET(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIR}\\\\dcmtk\\\\dicom.dic") # If private dictionary should be utilized, add it to default dictionary path. IF(ENABLE_PRIVATE_TAGS) - SET(DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH};${DCMTK_PREFIX}\\\\${DCMTK_INSTALL_DATDIR}\\\\private.dic") + SET(DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH};${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIR}\\\\dcmtk\\\\private.dic") ENDIF(ENABLE_PRIVATE_TAGS) # Again, for Windows strip all / from path and replace it with \\. STRING(REGEX REPLACE "/" "\\\\\\\\" DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH}") @@ -155,17 +155,17 @@ ELSE(WIN32 AND NOT CYGWIN) SET(ENVIRONMENT_PATH_SEPARATOR ":") # Set dictionary path to the data dir inside install main dir (prefix). IF(DCMTK_ENABLE_EXTERNAL_DICTIONARY) - SET(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/dicom.dic") + SET(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}/${CMAKE_INSTALL_DATADIR}/dcmtk/dicom.dic") # If private dictionary should be utilized, add it to default dictionary path. IF(ENABLE_PRIVATE_TAGS) - SET(DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH}:${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/private.dic") + SET(DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH}:${DCMTK_PREFIX}/${CMAKE_INSTALL_DATADIR}/dcmtk/private.dic") ENDIF(ENABLE_PRIVATE_TAGS) ELSE(DCMTK_ENABLE_EXTERNAL_DICTIONARY) SET(DCM_DICT_DEFAULT_PATH "") ENDIF(DCMTK_ENABLE_EXTERNAL_DICTIONARY) # Set default directory for configuration and support data. - SET(DCMTK_DEFAULT_CONFIGURATION_DIR "${DCMTK_PREFIX}/${DCMTK_INSTALL_ETCDIR}/") - SET(DCMTK_DEFAULT_SUPPORT_DATA_DIR "${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/") + SET(DCMTK_DEFAULT_CONFIGURATION_DIR "${DCMTK_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR}/dcmtk/") + SET(DCMTK_DEFAULT_SUPPORT_DATA_DIR "${DCMTK_PREFIX}/${CMAKE_INSTALL_DATADIR}/dcmtk/") ENDIF(WIN32 AND NOT CYGWIN) # Check the sizes of various types @@ -321,6 +321,15 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_INCLUDE_FILE_CXX("signal.h" HAVE_SIGNAL_H) CHECK_INCLUDE_FILE_CXX("fenv.h" HAVE_FENV_H) +IF(NOT APPLE) + # poll on macOS is unreliable, it first did not exist, then was broken until + # fixed in 10.9 only to break again in 10.12. + CHECK_INCLUDE_FILE_CXX("poll.h" DCMTK_HAVE_POLL) + IF(DCMTK_HAVE_POLL) + ADD_DEFINITIONS(-DDCMTK_HAVE_POLL=1) + ENDIF(DCMTK_HAVE_POLL) +ENDIF() + # This mimics the autoconf test. There are systems out there # (e.g. FreeBSD and NeXT) where tcp.h can't be compiled on its own. SET(TCP_H_DEPS "") @@ -568,8 +577,8 @@ ENDIF(WIN32 AND NOT CYGWIN) ENDIF(HAVE_CSTDDEF) CHECK_FUNCTIONWITHHEADER_EXISTS(feenableexcept "${HEADERS}" HAVE_PROTOTYPE_FEENABLEEXCEPT) - CHECK_FUNCTIONWITHHEADER_EXISTS(isinf "${HEADERS}" HAVE_PROTOTYPE_ISINF) - CHECK_FUNCTIONWITHHEADER_EXISTS(isnan "${HEADERS}" HAVE_PROTOTYPE_ISNAN) + CHECK_FUNCTIONWITHHEADER_EXISTS(isinf(0.) "${HEADERS}" HAVE_PROTOTYPE_ISINF) + CHECK_FUNCTIONWITHHEADER_EXISTS(isnan(0.) "${HEADERS}" HAVE_PROTOTYPE_ISNAN) CHECK_FUNCTIONWITHHEADER_EXISTS(finite "${HEADERS}" HAVE_PROTOTYPE_FINITE) CHECK_FUNCTIONWITHHEADER_EXISTS(std::isinf "${HEADERS}" HAVE_PROTOTYPE_STD__ISINF) CHECK_FUNCTIONWITHHEADER_EXISTS(std::isnan "${HEADERS}" HAVE_PROTOTYPE_STD__ISNAN) @@ -625,6 +634,7 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_FUNCTIONWITHHEADER_EXISTS("getgrnam_r((char*)0,(group*)0,(char*)0,0,(group**)0)" "${HEADERS}" HAVE_GETGRNAM_R) CHECK_FUNCTIONWITHHEADER_EXISTS("getpwnam_r((char*)0,(passwd*)0,(char*)0,0,(passwd**)0)" "${HEADERS}" HAVE_GETPWNAM_R) CHECK_FUNCTIONWITHHEADER_EXISTS("readdir_r((DIR*)0,(dirent*)0,(dirent**)0)" "${HEADERS}" HAVE_READDIR_R) + CHECK_FUNCTIONWITHHEADER_EXISTS("readdir_r((DIR*)0,(dirent*)0)" "${HEADERS}" HAVE_OLD_READDIR_R) CHECK_FUNCTIONWITHHEADER_EXISTS(nanosleep "${HEADERS}" HAVE_PROTOTYPE_NANOSLEEP) CHECK_FUNCTIONWITHHEADER_EXISTS("&passwd::pw_gecos" "${HEADERS}" HAVE_PASSWD_GECOS) diff --git a/CMake/dcmtkAfterModules.cmake b/CMake/dcmtkAfterModules.cmake index da7b4877..feeb096b 100644 --- a/CMake/dcmtkAfterModules.cmake +++ b/CMake/dcmtkAfterModules.cmake @@ -21,7 +21,7 @@ IF(BUILD_SINGLE_SHARED_LIBRARY) INSTALL(TARGETS dcmtk EXPORT DCMTKTargets COMPONENT lib - RUNTIME DESTINATION "${DCMTK_INSTALL_BINDIR}" - LIBRARY DESTINATION "${DCMTK_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${DCMTK_INSTALL_LIBDIR}") + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") ENDIF(BUILD_SINGLE_SHARED_LIBRARY) diff --git a/CMake/dcmtkMacros.cmake b/CMake/dcmtkMacros.cmake index 2ce1ff1f..543a8e3e 100644 --- a/CMake/dcmtkMacros.cmake +++ b/CMake/dcmtkMacros.cmake @@ -6,10 +6,10 @@ # FUNCTION(DCMTK_ADD_TESTS MODULE) IF(BUILD_APPS AND DCMTK_RUN_CTEST_SCRIPT) - SET(TEST_EXECUTABLE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests${CMAKE_EXECUTABLE_SUFFIX}") + SET(TEST_EXECUTABLE "$") IF(CMAKE_CROSSCOMPILING) IF(WIN32) - WINE_COMMAND(TEST_COMMAND "${TEST_EXECUTABLE}") + WINE_COMMAND(TEST_COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests${CMAKE_EXECUTABLE_SUFFIX}") STRING(REPLACE "\\" "\\\\" TEST_COMMAND "${TEST_COMMAND}") ELSEIF(ANDROID) SET(TEST_COMMAND "${ANDROID_TEMPORARY_FILES_LOCATION}/${MODULE}_tests") @@ -28,12 +28,17 @@ FUNCTION(DCMTK_ADD_TESTS MODULE) STRING(REGEX MATCH "OFTEST_REGISTER\\([^)]*" TEST "${TEST_LINE}") STRING(REPLACE "OFTEST_REGISTER(" "" TEST ${TEST}) # This assumes that test names are globally unique - ADD_TEST("${TEST}" "${CMAKE_COMMAND}" "-DDCMTK_CTEST_TESTCASE_COMMAND=${TEST_COMMAND}" "-DDCMTK_CTEST_TEST_NAME=${TEST}" "-DDCMTK_CTEST_EXTRA_ARGUMENTS=\$ENV{DCMTK_CTEST_EXTRA_ARGUMENTS}" "-P" "${DCMTK_RUN_CTEST_SCRIPT}") + ADD_TEST(NAME "${TEST}" COMMAND "${CMAKE_COMMAND}" "-DDCMTK_CTEST_TESTCASE_COMMAND=${TEST_COMMAND}" "-DDCMTK_CTEST_TEST_NAME=${TEST}" "-P" "${DCMTK_RUN_CTEST_SCRIPT}") SET_PROPERTY(TEST "${TEST}" PROPERTY LABELS "${MODULE}") - SET_PROPERTY(TEST "${TEST}" PROPERTY REQUIRED_FILES "${TEST_EXECUTABLE}") + IF(CMAKE_VERSION VERSION_LESS 3.0.0) + # CMake versions prior 3 seemingly don't understand $ within a test's REQUIRED_FILES property + SET_PROPERTY(TEST "${TEST}" PROPERTY REQUIRED_FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests${CMAKE_EXECUTABLE_SUFFIX}") + ELSE() + SET_PROPERTY(TEST "${TEST}" PROPERTY REQUIRED_FILES "${TEST_EXECUTABLE}") + ENDIF() ENDFOREACH(TEST_LINE) ADD_CUSTOM_TARGET("${MODULE}-test-exhaustive" - COMMAND "${CMAKE_COMMAND}" "-P" "${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunExhaustive.cmake" + COMMAND "${CMAKE_COMMAND}" "-DCONFIG=${DCMTK_CONFIG_GENERATOR_EXPRESSION}" "-P" "${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunExhaustive.cmake" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) ENDIF(BUILD_APPS AND DCMTK_RUN_CTEST_SCRIPT) @@ -61,7 +66,7 @@ MACRO(DCMTK_ADD_EXECUTABLE PROGRAM) INSTALL(TARGETS ${PROGRAM} EXPORT DCMTKTargets COMPONENT bin - DESTINATION ${DCMTK_INSTALL_BINDIR}) + DESTINATION ${CMAKE_INSTALL_BINDIR}) ENDIF(BUILD_APPS) ENDMACRO(DCMTK_ADD_EXECUTABLE) @@ -92,9 +97,9 @@ MACRO(DCMTK_ADD_LIBRARY LIBRARY) # Declare installation files INSTALL(TARGETS ${LIBRARY}${DCMTK_LIBRARY_SUFFIX} EXPORT DCMTKTargets - RUNTIME DESTINATION "${DCMTK_INSTALL_BINDIR}" COMPONENT bin - LIBRARY DESTINATION "${DCMTK_INSTALL_LIBDIR}" COMPONENT shlib - ARCHIVE DESTINATION "${DCMTK_INSTALL_LIBDIR}" COMPONENT lib) + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) ENDIF(NOT BUILD_SINGLE_SHARED_LIBRARY) ENDMACRO(DCMTK_ADD_LIBRARY) diff --git a/CMake/dcmtkPrepare.cmake b/CMake/dcmtkPrepare.cmake index 2e301003..40f4b308 100644 --- a/CMake/dcmtkPrepare.cmake +++ b/CMake/dcmtkPrepare.cmake @@ -8,10 +8,9 @@ ENDIF(DEFINED DCMTK_CONFIGURATION_DONE) SET(DCMTK_CONFIGURATION_DONE true) # Minimum CMake version required -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -IF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.8.2) - SET(CMAKE_BACKWARDS_COMPATIBILITY 3.8.2 CACHE STRING "Latest version of CMake when this project was released." FORCE) -ENDIF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.8.2) +IF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.10.2) + SET(CMAKE_BACKWARDS_COMPATIBILITY 3.10.2 CACHE STRING "Latest version of CMake when this project was released." FORCE) +ENDIF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.10.2) # CMAKE_BUILD_TYPE is set to value "Release" if none is specified by the # selected build file generator. For those generators that support multiple @@ -39,14 +38,14 @@ ENDIF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) # a development snapshot and an even number indicates an official release.) SET(DCMTK_MAJOR_VERSION 3) SET(DCMTK_MINOR_VERSION 6) -SET(DCMTK_BUILD_VERSION 2) +SET(DCMTK_BUILD_VERSION 3) # The ABI is not guaranteed to be stable between different snapshots/releases, # so this particular version number is increased for each snapshot or release. -SET(DCMTK_ABI_VERSION 12) +SET(DCMTK_ABI_VERSION 13) # Package "release" settings (some are currently unused and, therefore, disabled) SET(DCMTK_PACKAGE_NAME "dcmtk") -SET(DCMTK_PACKAGE_DATE "2017-07-14") +SET(DCMTK_PACKAGE_DATE "2018-02-05") SET(DCMTK_PACKAGE_VERSION "${DCMTK_MAJOR_VERSION}.${DCMTK_MINOR_VERSION}.${DCMTK_BUILD_VERSION}") SET(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_MAJOR_VERSION}${DCMTK_MINOR_VERSION}${DCMTK_BUILD_VERSION}) SET(DCMTK_PACKAGE_VERSION_SUFFIX "") @@ -185,25 +184,18 @@ ENDIF(CMAKE_CROSSCOMPILING) # Installation sub-directories #----------------------------------------------------------------------------- -SET(DCMTK_INSTALL_BINDIR "bin" CACHE STRING "Installation sub-directory for binary executables.") -SET(DCMTK_INSTALL_INCDIR "include" CACHE STRING "Installation sub-directory for header files.") -SET(DCMTK_INSTALL_LIBDIR "lib" CACHE STRING "Installation sub-directory for object code libraries.") +# Set project name variable to package name for GnuInstallDirs +SET(PROJECT_NAME "${DCMTK_PACKAGE_NAME}") +# Provides CMake cache variables with reasonable defaults to create a GNU style installation +# directory structure +INCLUDE(GNUInstallDirs) # CMake's files (DCMTKTarget.cmake, DCMTKConfigVersion.cmake and DCMTKConfig.cmake) are installed # to different installation paths under Unix- and Windows-based systems IF(UNIX) - SET(DCMTK_INSTALL_CMKDIR "lib/cmake/dcmtk" CACHE STRING "Installation sub-directory for CMake files.") + SET(DCMTK_INSTALL_CMKDIR "${CMAKE_INSTALL_LIBDIR}/cmake/dcmtk") ELSEIF(WIN32) - SET(DCMTK_INSTALL_CMKDIR "cmake" CACHE STRING "Installation sub-directory for CMake files.") + SET(DCMTK_INSTALL_CMKDIR "cmake") ENDIF(UNIX) -SET(DCMTK_INSTALL_ETCDIR "etc/dcmtk" CACHE STRING "Installation sub-directory for configuration files.") -SET(DCMTK_INSTALL_DATDIR "share/dcmtk" CACHE STRING "Installation sub-directory for sample files and the like.") -SET(DCMTK_INSTALL_DOCDIR "share/doc/dcmtk" CACHE STRING "Installation sub-directory for general documentation.") -SET(DCMTK_INSTALL_HTMDIR "share/doc/dcmtk/html" CACHE STRING "Installation sub-directory for HTML documentation.") -SET(DCMTK_INSTALL_MANDIR "share/man" CACHE STRING "Installation sub-directory for man pages.") - -MARK_AS_ADVANCED(DCMTK_INSTALL_BINDIR DCMTK_INSTALL_INCDIR DCMTK_INSTALL_LIBDIR DCMTK_INSTALL_CMKDIR - DCMTK_INSTALL_ETCDIR DCMTK_INSTALL_DATDIR DCMTK_INSTALL_DOCDIR DCMTK_INSTALL_HTMDIR - DCMTK_INSTALL_MANDIR) #----------------------------------------------------------------------------- # Build directories @@ -219,20 +211,15 @@ FILE(WRITE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake" "") # Platform-independent settings #----------------------------------------------------------------------------- -IF(COMMAND CMAKE_POLICY) - # Enable new CMake behaviour when dealing with libraries whose full path is - # given to the linker. This is necessary to avoid warnings in CMake versions - # greater than 2.6. - # See http://www.cmake.org/cmake/help/cmake-2.6.html#policy:CMP0003 - CMAKE_POLICY(SET CMP0003 NEW) - - # Works around warnings about escaped quotes in ADD_DEFINITIONS statements - CMAKE_POLICY(SET CMP0005 OLD) -ENDIF(COMMAND CMAKE_POLICY) - # pass optional build date to compiler #SET(DCMTK_BUILD_DATE "\\\"YYYY-MM-DD\\\"") IF(DCMTK_BUILD_DATE) + + IF(COMMAND CMAKE_POLICY) + # Works around warnings about escaped quotes in ADD_DEFINITIONS statements + CMAKE_POLICY(SET CMP0005 OLD) + ENDIF(COMMAND CMAKE_POLICY) + # Xcode needs one escaping layer more than (as far as we know) everyone else - we gotta go deeper! IF(CMAKE_GENERATOR MATCHES Xcode) STRING(REPLACE "\\" "\\\\" DCMTK_BUILD_DATE "${DCMTK_BUILD_DATE}") @@ -512,3 +499,13 @@ DCMTK_TEST_SOCKET_LIBRARY(socket "socket") IF(CMAKE_CXX_COMPILER_ID STREQUAL SunPro) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -features=tmplrefstatic") ENDIF() + +#----------------------------------------------------------------------------- +# workaround for using the deprecated generator expression $ +# with old CMake versions that do not understand $ +#----------------------------------------------------------------------------- +IF(CMAKE_VERSION VERSION_LESS 3.0.0) + SET(DCMTK_CONFIG_GENERATOR_EXPRESSION "$" CACHE INTERNAL "the generator expression to use for retriving the current config") +ELSE() + SET(DCMTK_CONFIG_GENERATOR_EXPRESSION "$" CACHE INTERNAL "the generator expression to use for retriving the current config") +ENDIF() diff --git a/CMake/dcmtkTestCharSignedness.cc b/CMake/dcmtkTestCharSignedness.cc old mode 100755 new mode 100644 diff --git a/CMake/osconfig.h.in b/CMake/osconfig.h.in index 9b7a2fa9..c837cc86 100644 --- a/CMake/osconfig.h.in +++ b/CMake/osconfig.h.in @@ -56,6 +56,9 @@ /* Define if we want a populated builtin dictionary */ #cmakedefine ENABLE_BUILTIN_DICTIONARY "@ENABLE_BUILTIN_DICTIONARY@" +/* Define if we want load external dictionaries */ +#cmakedefine ENABLE_EXTERNAL_DICTIONARY "@ENABLE_EXTERNAL_DICTIONARY@" + /* Define the environment variable path separator */ #define ENVIRONMENT_PATH_SEPARATOR '@ENVIRONMENT_PATH_SEPARATOR@' @@ -396,7 +399,7 @@ /* Define if your system supports readdir_r with the obsolete Posix 1.c draft 6 declaration (2 arguments) instead of the Posix 1.c declaration with 3 arguments. */ -/* #undef HAVE_OLD_READDIR_R */ +#cmakedefine HAVE_OLD_READDIR_R @HAVE_OLD_READDIR_R@ /* Define if your system has a prototype for feenableexcept in fenv.h */ #cmakedefine HAVE_PROTOTYPE_FEENABLEEXCEPT @HAVE_PROTOTYPE_FEENABLEEXCEPT@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 59a7587b..91f68e14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ PROJECT(DCMTK) # Minimum CMake version required -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5) # Disables a warning emitted by CMake 3.7.2. The same setting is performed # again in CMake/dcmtkPrepare.cmake (included below), but the warning is still @@ -69,7 +69,7 @@ ELSE(CMAKE_CROSSCOMPILING) ENDIF(CMAKE_CROSSCOMPILING) # Add a target to run the unit tests in exhaustive mode ADD_CUSTOM_TARGET("test-exhaustive" - COMMAND "${CMAKE_COMMAND}" "-P" + COMMAND "${CMAKE_COMMAND}" "-DCONFIG=${DCMTK_CONFIG_GENERATOR_EXPRESSION}" "-P" "${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunExhaustive.cmake" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" ) @@ -91,14 +91,14 @@ INCLUDE(CMake/dcmtkAfterModules.cmake NO_POLICY_SCOPE) # Install global headers INSTALL(FILES "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h" "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h" - DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk/config" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk/config" COMPONENT include) # Install DCMTK's general documentation files INSTALL(FILES ANNOUNCE CHANGES COPYRIGHT CREDITS FAQ HISTORY VERSION - DESTINATION "${DCMTK_INSTALL_DOCDIR}" + DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) -INSTALL(DIRECTORY docs/ DESTINATION "${DCMTK_INSTALL_DOCDIR}" +INSTALL(DIRECTORY docs/ DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc FILES_MATCHING PATTERN "CHANGES.???") #----------------------------------------------------------------------------- diff --git a/INSTALL b/INSTALL index 8f95525a..2140c577 100644 --- a/INSTALL +++ b/INSTALL @@ -29,8 +29,8 @@ Microsoft Windows The DCMTK software can be compiled under a native Microsoft Windows environment (see section "Microsoft Windows with CMake" below for more information). -The current release successfully compiles on the following operating system / -hardware / compiler combinations: +The current (minor) release successfully compiles on the following operating +system / hardware / compiler combinations: Windows 7 / Intel x86 / Microsoft Visual C++ 2005 Express (VS 8) Windows 7 / Intel x86 / Microsoft Visual C++ 2008 Express (VS 9) @@ -40,21 +40,13 @@ hardware / compiler combinations: Windows 7 / Intel x86 / Microsoft Visual C++ 2015 Community (VS 14) Windows 7 / Intel x86 / Microsoft Visual C++ 2017 Community (VS 15) Windows 7 / Intel x86 / MinGW gcc 4.9.1 (i686-w64-mingw32) + Windows 10 / Intel x86 / Microsoft Visual C++ 2015 Community (VS 14) Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10) Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11) Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2013 Express (VS 12) Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14) Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15) Windows 7 / amd64|x86_64 / MinGW gcc 4.9.1 (x86_64-w64-mingw32) - Windows 8.1 / Intel x86 / Microsoft Visual C++ 2008 Express (VS 9) - Windows 8.1 / Intel x86 / Microsoft Visual C++ 2010 Express (VS 10) - Windows 8.1 / Intel x86 / Microsoft Visual C++ 2012 Express (VS 11) - Windows 8.1 / Intel x86 / Microsoft Visual C++ 2015 Express (VS 14) - Windows 8.1 / Intel x86 / Microsoft Visual C++ 2017 Community (VS 15) - Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10) - Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11) - Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2015 Express (VS 14) - Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15) Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14) Unix (or lookalikes) @@ -65,8 +57,8 @@ operating system / hardware / compiler combinations using the instructions given below: FreeBSD 10.1 / amd64|x86_64 / Clang 3.4.1 - Linux 4.11.9 / amd64|x86_64 / Clang 4.0.1 (Arch Linux) - Linux 4.11.9 / amd64|x86_64 / GNU gcc 7.1.1 (Arch Linux) + Linux 4.11.9 / amd64|x86_64 / Clang 5.0.1 (Arch Linux) + Linux 4.11.9 / amd64|x86_64 / GNU gcc 7.2.1 (Arch Linux) Linux 3.10.0 / amd64|x86_64 / Clang 3.4.2 (CentOS 7.3) Linux 3.10.0 / amd64|x86_64 / GNU gcc 4.8.5 (CentOS 7.3) Linux 3.16.0 / amd64|x86_64 / Clang 3.5.0 (Debian 8.8) @@ -81,27 +73,18 @@ given below: Linux 4.9.0 / Intel x86 / GNU gcc 6.3.0 (Debian 9.0) Linux 4.10.0 / amd64|x86_64 / GNU gcc 6.3.0 (Ubuntu 17.04) Linux 4.10.0 / amd64|x86_64 / Clang 4.0.0 (Ubuntu 17.04) - MacOS X 14.4.0 / amd64|x86_64 / Apple Clang 6.0 + MacOS X 10.10.4 / amd64|x86_64 / Apple Clang 6.0 NetBSD 7.0 / amd64|x86_64 / Clang 4.0.0 NetBSD 7.0 / amd64|x86_64 / GNU gcc 4.8.5 OpenBSD 6.0 / amd64|x86_64 / Clang 3.8.0 OpenBSD 6.0 / amd64|x86_64 / GNU gcc 4.2.1 OpenIndiana / Intel x86 / Clang 4.0.0 (OpenIndiana 2017.04) OpenIndiana / Intel x86 / GNU gcc 4.9.4 (OpenIndiana 2017.04) - QNX 6.5 / Intel x86 / GNU gcc 4.4.2 (see note *1) Solaris 11.3 / Intel x86 / GNU gcc 4.8.2 Solaris 11.3 / Intel x86 / SunPro CC 5.14 (Oracle Developer Studio 12.5) Solaris 11.3 / Intel x86 / SunPro CC 5.15 (Oracle Developer Studio 12.6) Windows 7 / amd64|x86_64 / CygWin 2.8.0 (gcc 6.3.0) -Other Platforms ---------------- - -Earlier releases of the DCMTK are known to also compile on further platforms -which are not available to us for testing purposes any more, e.g. AIX, HP-UX, -IRIX, NeXTStep, OSF/1, Solaris/SunOS, Ultrix. Also the Intel C++ Compiler and -other compilers might still work but we haven't tested them this time. - Cross Compiling --------------- @@ -109,8 +92,6 @@ The current DCMTK release can be cross-compiled targeting the following platforms: Android / arm64 / GNU gcc 4.9.2 (API 24, ABI arm64-v8a) - Windows 7 / Intel x86 / MinGW gcc 4.9.1 - Windows 7 / amd64|x86_64 / MinGW gcc 4.9.1 Cross compiling support with running configuration and unit tests is currently only provided using CMake and requires the use of the Android emulator or Wine @@ -124,6 +105,33 @@ customization is needed and you have to find a way to provide the information from the configuration tests that need to be run on the target hardware yourself. +Other Platforms +--------------- + +The previous release DCMTK 3.6.2 was also tested on the following platforms +that may still work, but were not tested again for this minor release: + + QNX 6.5 / Intel x86 / GNU gcc 4.4.2 (see note *1) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2008 Express (VS 9) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2010 Express (VS 10) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2012 Express (VS 11) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2015 Express (VS 14) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2017 Community (VS 15) + Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10) + Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11) + Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2015 Express (VS 14) + Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15) + +Cross compilers: + + Windows 7 / Intel x86 / MinGW gcc 4.9.1 (Linux host) + Windows 7 / amd64|x86_64 / MinGW gcc 4.9.1 (Linux host) + +Earlier releases of the DCMTK are known to also compile on further platforms +which are not available to us for testing purposes any more, e.g. AIX, HP-UX, +IRIX, NeXTStep, OSF/1, Solaris/SunOS, Ultrix. Also the Intel C++ Compiler and +other compilers might still work but we haven't tested them this time. + Platform Notes -------------- @@ -140,7 +148,7 @@ One", i.e. DICOM network transmission "tunneled" through a secure TLSv1 transport connection. DCMTK relies on the OpenSSL toolkit (www.openssl.org) for the underlying cryptographic routines and the TLS protocol implementation. This release of DCMTK is known to compile with the OpenSSL releases 0.9.8 to -1.1.0f, although other releases may work as well. +1.1.0g, although other releases may work as well. When using Autoconf, if support for security enhancements is desired, a compiled version of the OpenSSL libraries and include files must be available during @@ -180,7 +188,7 @@ LIBTIFF SUPPORT Starting with release 3.5.1, DCMTK supports the conversion of DICOM images to TIFF. DCMTK relies on the libtiff toolkit (www.libtiff.org) for this purpose. This release of DCMTK is known to compile with the libtiff releases 3.7.4 to -4.0.8, although other releases may work as well. However, libtiff releases +4.0.9, although other releases may work as well. However, libtiff releases prior to version 3.7.0 will not work since the TIFFCleanup() function was not yet available. On Windows, libtiff 3.7.4 or higher is required due to incompatible API changes in libtiff. @@ -201,7 +209,7 @@ LIBPNG SUPPORT Starting with release 3.5.3, DCMTK supports the conversion of DICOM images to PNG. DCMTK relies on the libpng toolkit (www.libpng.org) for this purpose. This release of DCMTK is known to compile with the current libpng releases -1.2.8 to 1.6.30, although other releases may work as well. +1.2.8 to 1.6.31, although other releases may work as well. When using Autoconf, if support for PNG export is desired, a compiled version of the libpng libraries and include files must be available during compilation of @@ -220,7 +228,7 @@ LIBXML2 SUPPORT Starting with release 3.5.3, DCMTK supports the conversion of XML documents to DICOM files. DCMTK relies on the libxml2 toolkit (www.libxml.org) for this purpose. This release of DCMTK is known to compile with the libxml2 releases -2.6.26 to 2.9.4, although other releases may work as well. +2.6.26 to 2.9.7, although other releases may work as well. When using Autoconf, if support for XML import is desired, a compiled version of the libxml2 (and possibly iconv) libraries and include files must be available @@ -397,167 +405,20 @@ Please note that this setting does not depend on enabling the STL features but not all combinations (e.g. enabling C++11 but disabling std::string) may work. -BUILDING (Unix with Autoconf) -============================= - -GNU Autoconf is used to configure the software for the hardware / operating -system you are using. You do not need to obtain GNU Autoconf to compile and -install this software. All the necessary configure scripts are included in -this distribution. The configure scripts examine your system capabilities and -automatically generate include files and Makefiles. - -Perform the following steps from the top-level (dcmtk-3.6.2) directory to -compile and install the software: - -Step 1: - ./configure - -Step 1 executes the configure scripts in each subdirectory. First, the system -capabilities are examined and then Makefiles are generated. By default, -executables and other files will be installed (in Step 3) in the directory -"/usr/local" in the corresponding subdirectories. If you wish to use another -install prefix you can use the --prefix= flag to configure. E.g., if you -wish to install underneath your home directory in "~/dicom" then you should -start configure as: - - ./configure --prefix=$HOME/dicom - -Step 1 is also the place where support for the external libraries can be -enabled or disabled. By default, all libraries installed in the standard -path are enabled automatically. Use the --without-openssl switch to disable -OpenSSL support. The --with-opensslinc option allows to specify the directory -in which OpenSSL is installed. This is usually the directory that has been -used as --prefix when compiling and installing OpenSSL. - -For example, if you wish to enable the security enhancements, and OpenSSL is -installed in "/usr/local/apps/openssl-1.1.0f", then you should start configure -as: - - ./configure --with-opensslinc=/usr/local/apps/openssl-1.1.0f - -Configure will assume that the OpenSSL include files are installed in -"/usr/local/apps/openssl-1.1.0f/include" and will expect the library in -"/usr/local/apps/openssl-1.1.0f/lib". Appropriate options will be passed to -the compiler and the linker. - -Support for zlib, libtiff, libpng, libxml2, libwrap and libiconv can be enabled -in a similar way (in case these libraries are not installed in the standard -path): - - ./configure --with-libzlibinc=/usr/local/apps/zlib-1.2.11 - --with-libtiffinc=/usr/local/apps/libtiff-4.0.8 - --with-libpnginc=/usr/local/apps/libpng-1.6.30 - --with-libxmlinc=/usr/local/apps/libxml2-2.9.4 - --with-libwrapinc=/usr/local/apps/tcp_wrappers-7.6 - --with-libiconvinc=/usr/local/apps/libiconv-1.15 - - --with-libicuinc=/usr/local/apps/icu-59.1 - -Different configure options can be combined in any order. configure --help -will print a list of all existing configure options. configure --help=short -will display only those options specific to the DCMTK. Useful configure -options are: - - --enable-debug compile with debug code, don't optimize - --disable-debug compile without debug code (default) - --enable-threads=TYPE compile with MT support (posix/solaris/auto=default) - --disable-threads compile without MT support - --enable-lfs=TYPE compile with LFS support (lfs/lfs64/auto=default) - --disable-lfs compile without LFS support - --enable-std-includes use C++ ANSI standard includes - --disable-std-includes use old C++ includes - --enable-private-tags enable private tag dictionary - --disable-private-tags don't enable private tag dictionary (default) - --enable-external-dict enable loading of external dictionary (default) - --disable-external-dict don't load external dictionary - --enable-builtin-dict enable loading of built-in dictionary - --disable-builtin-dict don't load built-in dictionary (default) - --disable-rpath do not hardcode runtime library paths - --enable-charconv=TYPE enable character set conversion support - (libiconv/libicu/stdlibc/auto=default) - --disable-charconv disable character set conversion support - --enable-cxx11 use C++11 - --disable-cxx11 do not use C++11 (default) - --enable-stl use C++ STL - --disable-stl do not use C++ STL (default) - -Step 2: - make all - -Step 2 will build the libraries and executables. If you run into problems see -the section "Solving configuration and compilation problems" below. - -Step 3: - make install - -Step 3 will install the executables and some support files (data dictionary, -configuration and documentation files). If you also wish to install the -libraries and include files then use "make install-lib". For the HTML -documentation (see below) use "make install-html" (requires Doxygen to be -installed); "make install-all" installs all of the above. - -In case the files should be installed in a temporary directory, e.g. in order -to create a distribution package, use "make install DESTDIR=" to prepend - to the installation directories specified for configure. - -Step 4: - make distclean - -Step 4 will revert the source tree to the state prior to Step 1. If you just -want to get rid of object files and local executables use "make clean" instead. - -Note: In case you do not want to compile all modules, you can remove those -modules from the text file "config/modules" prior to Step 1 and execute the -following commands: - - cd config - ./rootconf - cd .. - -This generates a new Makefile and configure script in the top-level toolkit -directory. - -Solving configuration and compilation problems ----------------------------------------------- - -The configure script might not be able to guess the correct compiler and -compiler flags to use. For example, we have noticed that use of the -pedantic -flag to the GNU C++ compiler causes compilation errors on some systems due to -system include files with incorrect ANSI function prototypes. - -You can set environment variables to initialize configure before it is called -(before Step 1 above): - - Set environment variable CC to the name of your C compiler. - Set environment variable CFLAGS to the compile flags of your C compiler. - Set environment variable CXX to the name of your C++ compiler. - Set environment variable CXXFLAGS to the compile flags of your C++ compiler. - Set environment variable LDFLAGS to your linker flags. - Set environment variable CPPFLAGS to you preprocessor flags. - -You do not need to specify all the above environment variables since the -default settings are sensible for most Unix compilers. Further influential -environment variables are listed in the output of configure --help. - -If the configure script fails you may have to change the configuration settings -in the config directory. See the "config/docs" directory for more information. - -See also the FAQ at http://forum.dcmtk.org/faq for more hints. - - -BUILDING (CMake in general) +BUILDING =========================== -CMake is a cross-platform, open-source make system which can be used to control -the software compilation process using simple configuration files. CMake can be +CMake is now the default tool for configuring a DCMTK build. CMake is a +cross-platform, open-source make system which can be used to control the +software compilation process using simple configuration files. CMake can be obtained free of charge from http://www.cmake.org/. For configuring the DCMTK, the toolkit contains corresponding "CMakeLists.txt" files in all necessary directories. In detail, these "CMakeLists.txt" files will serve as an input to CMake which will generate suitable build files for all of DCMTK's projects from these files. -DCMTK 3.6.2 requires CMake version 2.8.3 or later. We recommend using the -latest stable release of CMake (currently version 3.8.2) since newer versions +DCMTK 3.6.3 requires CMake version 2.8.5 or later. We recommend using the +latest stable release of CMake (currently version 3.10.2) since newer versions of CMake often provide better output in case of errors and are generally easier to use (for example by providing better support for detecting the availability of third party libraries). If possible, use the CMake version your operating @@ -591,9 +452,9 @@ selected build file generator. For those generators that support multiple configuration types (e.g. Debug, Release), CMAKE_CONFIGURATION_TYPES holds possible values. For other generators, this value is empty, and for those generators the build type is fixated by CMake and cannot be changed otherwise. -Please note that Visual Studio (seemingly) ignores CMAKE_BUILD_TYPE and always -starts off using "Debug", so you should best change it to "Release" manually -before starting the build process. +Please note that Visual Studio ignores CMAKE_BUILD_TYPE and always starts off +using "Debug", so you should best change it to "Release" manually before +starting the build process. To disable the CMAKE_BUILD_TYPE default value, set CMAKE_BUILD_TYPE to value "None" during CMake configuration, e.g. use "-DCMAKE_BUILD_TYPE:STRING=None" @@ -641,7 +502,7 @@ CMake, perform the following steps: 1. Go Start -> Programs -> CMake -> "CMake" or "CMake (cmake-gui)" to start the CMake utility through which the configuration can be done. 2. In the entry field "Where is the source code:" enter the directory in which - the DCMTK source code resides, e.g. "C:\dcmtk-3.6.2". + the DCMTK source code resides, e.g. "C:\dcmtk-3.6.3". 3. In the entry field "Where to build the binaries:" enter the directory in which the libraries and binaries are to be built, e.g. "C:\dcmtk-msvc15". 4. In the combobox "Build for:" or "Specify the generator for this project:" @@ -655,20 +516,20 @@ CMake, perform the following steps: example, in order to turn on libxml2 support, set the value of variable "DCMTK_WITH_XML" to "ON" and set the value of variable "WITH_LIBXMLINC" to the path where the include files and libraries of libxml2 can be found, - e.g. "C:\libxml2-2.9.4". The support of all other external libraries can + e.g. "C:\libxml2-2.9.7". The support of all other external libraries can be turned on in a similar way: libpng support: set "DCMTK_WITH_PNG" to "ON" and - set "WITH_LIBPNGINC" e.g. to "C:\libpng-1.6.30" + set "WITH_LIBPNGINC" e.g. to "C:\libpng-1.6.31" libtiff support: set "DCMTK_WITH_TIFF" to "ON" and - set "WITH_LIBTIFFINC" e.g. to "C:\libtiff-4.0.8" + set "WITH_LIBTIFFINC" e.g. to "C:\libtiff-4.0.9" OpenSSL support: set "DCMTK_WITH_OPENSSL" to "ON" and - set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.1.0f" + set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.1.0g" zlib support: set "DCMTK_WITH_ZLIB" to "ON" and @@ -779,10 +640,6 @@ Known limitations of DCMTK on the Windows platform. Unix with CMake --------------- -We have polished our CMake configuration for DCMTK release 3.6.2 and consider -it a full replacement for Autoconf that should be compatible or provide even -better support on some platforms (e.g. Android). - One key difference when using CMake for building on Unix like systems is that we use the "find_package()" mechanism for all external libraries and not just the ICU. Most Unix like systems provide a package manager or even if not at least @@ -801,17 +658,17 @@ The typical way to build DCMTK on Unix like systems with CMake is as follows mkdir dcmtk-gcc-`g++ -dumpversion` cd dcmtk-gcc- - cmake ../dcmtk-3.6.2 + cmake ../dcmtk-3.6.3 make -j8 - make DESTDIR=../dcmtk-3.6.2-install install + make DESTDIR=../dcmtk-3.6.3-install install The above commands assume that the DCMTK source code was extracted to the -current working directory into a folder named dcmtk-3.6.2 and that the GNU gcc +current working directory into a folder named dcmtk-3.6.3 and that the GNU gcc compiler will be used (note that clang++ -dumpversion will give wrong results). DCMTK will be configured using CMake with the default options, detecting and including all available support libraries and then compiled using eight CPU cores (adjust as needed). The result will be installed to the directory -"dcmtk-3.6.2-install" next to the source code directory. +"dcmtk-3.6.3-install" next to the source code directory. HTML DOCUMENTATION AND MAN PAGES @@ -820,7 +677,7 @@ HTML DOCUMENTATION AND MAN PAGES Most DCMTK modules have been documented with Doxygen (www.doxygen.org), a free source code documentation system similar to Javadoc. Unix users who have Doxygen installed can create a hypertext documentation with "make html" in the -"dcmtk-3.6.2" or "doxygen" directory; Windows and other CMake users should +"dcmtk-3.6.3" or "doxygen" directory; Windows and other CMake users should build the "DOXYGEN" subproject. A project file for Microsoft's HTML Help Workshop can also be generated allowing to create a single CHM file (compressed HTML) from the documentation. Other output formats (e.g. LaTeX) can be enabled @@ -840,15 +697,30 @@ In order to generate plain text files from the man pages call "make text" in the "doxygen" directory. The output files are stored in "doxygen/man2text". +DICOM DATA DICTIONARY +===================== + +Almost all DCMTK tools and libraries require the so-called DICOM data dictionary +(i.e. information from part 6 of the DICOM standard) to be available in order +to map the attribute tags to their associated Value Representation (VR), Value +Multiplicity (VM) and attribute name (official keyword). The data dictionary +can either be loaded from file (default on Unix systems) or be built into the +respective tool / dcmdata library (default on Windows systems). The default +behavior can be changed using appropriate configuration options. + +Details can be found in the documentation file at "dcmdata/docs/datadict.txt" +(or "/usr/local/share/doc/dcmtk/datadict.txt"). + + COMPILE-TIME FLAGS AND ENVIRONMENT VARIABLES ============================================ The behavior of several DCMTK tools and libraries can be modified by a number -of compile-time flags (macros). Those macros which are not automatically +of compile-time flags (macros). Those macros that are not automatically handled by the configure mechanism are documented in "config/docs/macros.txt" (or "/usr/local/share/doc/dcmtk/macros.txt"). -There is also a number of environment variables which affect DCMTK's behavior. +There is also a number of environment variables that affect DCMTK's behavior. These are documented in "config/docs/envvars.txt" (or "/usr/local/share/doc/ dcmtk/envvars.txt"). @@ -860,7 +732,7 @@ DCMTK comes with a test suite that verifies that the toolkit works as expected. The tests are contained in a module's "tests" subdirectory. Some tests are marked as exhaustive and are only run if explicitly enabled, see below. -When using configure for building DCMTK, all tests can be run via "make check". +When using Autoconf for building DCMTK, all tests can be run via "make check". If a test fails, make will stop and the failure reason of the test which failed should be visible. Additionally, you may run the exhaustive unit tests by typing "make check-exhaustive". @@ -877,6 +749,157 @@ will build the test runner for each module as "/tests/tests". CMake will add the module name as a prefix to this file's name, e.g. "ofstd_tests". For more information, call this program with the --help option. +BUILDING (Unix with Autoconf) +============================= + +Configuring a DCMTK build with GNU Autoconf has been deprecated with this DCMTK +release 3.6.3 and will be removed in future releases. However, you might still +use Autoconf with this release if you prefer it for whatever reason: + +You do not need to obtain GNU Autoconf to compile and install this software. +All the necessary configure scripts are included in this distribution. The +configure scripts examine your system capabilities and automatically generate +include files and Makefiles. + +Perform the following steps from the top-level (dcmtk-3.6.3) directory to +compile and install the software: + +Step 1: + ./configure --ignore-deprecation + +Step 1 executes the configure scripts in each subdirectory. First, the system +capabilities are examined and then Makefiles are generated. By default, +executables and other files will be installed (in Step 3) in the directory +"/usr/local" in the corresponding subdirectories. If you wish to use another +install prefix you can use the --prefix= flag to configure. E.g., if you +wish to install underneath your home directory in "~/dicom" then you should +start configure as: + + ./configure --ignore-deprecation --prefix=$HOME/dicom + +Step 1 is also the place where support for the external libraries can be +enabled or disabled. By default, all libraries installed in the standard +path are enabled automatically. Use the --without-openssl switch to disable +OpenSSL support. The --with-opensslinc option allows to specify the directory +in which OpenSSL is installed. This is usually the directory that has been +used as --prefix when compiling and installing OpenSSL. + +For example, if you wish to enable the security enhancements, and OpenSSL is +installed in "/usr/local/apps/openssl-1.1.0g", then you should start configure +as: + + ./configure --ignore-deprecation + --with-opensslinc=/usr/local/apps/openssl-1.1.0g + +Configure will assume that the OpenSSL include files are installed in +"/usr/local/apps/openssl-1.1.0g/include" and will expect the library in +"/usr/local/apps/openssl-1.1.0g/lib". Appropriate options will be passed to +the compiler and the linker. + +Support for zlib, libtiff, libpng, libxml2, libwrap and libiconv can be enabled +in a similar way (in case these libraries are not installed in the standard +path): + + ./configure --ignore-deprecation + --with-libzlibinc=/usr/local/apps/zlib-1.2.11 + --with-libtiffinc=/usr/local/apps/libtiff-4.0.9 + --with-libpnginc=/usr/local/apps/libpng-1.6.31 + --with-libxmlinc=/usr/local/apps/libxml2-2.9.7 + --with-libwrapinc=/usr/local/apps/tcp_wrappers-7.6 + --with-libiconvinc=/usr/local/apps/libiconv-1.15 + + --with-libicuinc=/usr/local/apps/icu-59.1 + +Different configure options can be combined in any order. configure --help +will print a list of all existing configure options. configure --help=short +will display only those options specific to the DCMTK. Useful configure +options are: + + --enable-debug compile with debug code, don't optimize + --disable-debug compile without debug code (default) + --enable-threads=TYPE compile with MT support (posix/solaris/auto=default) + --disable-threads compile without MT support + --enable-lfs=TYPE compile with LFS support (lfs/lfs64/auto=default) + --disable-lfs compile without LFS support + --enable-std-includes use C++ ANSI standard includes + --disable-std-includes use old C++ includes + --enable-private-tags enable private tag dictionary + --disable-private-tags don't enable private tag dictionary (default) + --enable-external-dict enable loading of external dictionary (default) + --disable-external-dict don't load external dictionary + --enable-builtin-dict enable loading of built-in dictionary + --disable-builtin-dict don't load built-in dictionary (default) + --disable-rpath do not hardcode runtime library paths + --enable-charconv=TYPE enable character set conversion support + (libiconv/libicu/stdlibc/auto=default) + --disable-charconv disable character set conversion support + --enable-cxx11 use C++11 + --disable-cxx11 do not use C++11 (default) + --enable-stl use C++ STL + --disable-stl do not use C++ STL (default) + +Step 2: + make all + +Step 2 will build the libraries and executables. If you run into problems see +the section "Solving configuration and compilation problems" below. + +Step 3: + make install + +Step 3 will install the executables and some support files (data dictionary, +configuration and documentation files). If you also wish to install the +libraries and include files then use "make install-lib". For the HTML +documentation (see below) use "make install-html" (requires Doxygen to be +installed); "make install-all" installs all of the above. + +In case the files should be installed in a temporary directory, e.g. in order +to create a distribution package, use "make install DESTDIR=" to prepend + to the installation directories specified for configure. + +Step 4: + make distclean + +Step 4 will revert the source tree to the state prior to Step 1. If you just +want to get rid of object files and local executables use "make clean" instead. + +Note: In case you do not want to compile all modules, you can remove those +modules from the text file "config/modules" prior to Step 1 and execute the +following commands: + + cd config + ./rootconf + cd .. + +This generates a new Makefile and configure script in the top-level toolkit +directory. + +Solving configuration and compilation problems +---------------------------------------------- + +The configure script might not be able to guess the correct compiler and +compiler flags to use. For example, we have noticed that use of the -pedantic +flag to the GNU C++ compiler causes compilation errors on some systems due to +system include files with incorrect ANSI function prototypes. + +You can set environment variables to initialize configure before it is called +(before Step 1 above): + + Set environment variable CC to the name of your C compiler. + Set environment variable CFLAGS to the compile flags of your C compiler. + Set environment variable CXX to the name of your C++ compiler. + Set environment variable CXXFLAGS to the compile flags of your C++ compiler. + Set environment variable LDFLAGS to your linker flags. + Set environment variable CPPFLAGS to you preprocessor flags. + +You do not need to specify all the above environment variables since the +default settings are sensible for most Unix compilers. Further influential +environment variables are listed in the output of configure --help. + +If the configure script fails you may have to change the configuration settings +in the config directory. See the "config/docs" directory for more information. + +See also the FAQ at http://forum.dcmtk.org/faq for more hints. --------- @@ -885,4 +908,4 @@ Have fun. M. Eichelberg, J. Riesmeier, M. Onken, J. Schlamelcher DCMTK Development Team, Oldenburg, Germany. -Last revised: 2017-07-14 (Schlamelcher) +Last revised: 2018-02-05 (Schlamelcher) diff --git a/VERSION b/VERSION index b7276283..4a788a01 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.6.2 +3.6.3 diff --git a/config/aclocal.m4 b/config/aclocal.m4 index 827d6098..6e279d1b 100644 --- a/config/aclocal.m4 +++ b/config/aclocal.m4 @@ -567,6 +567,37 @@ done ]) +dnl AC_CHECK_POLL_H checks if we have a usable . +dnl poll on macOS is unreliable, it first did not exist, then was broken until +dnl fixed in 10.9 only to break again in 10.12. +dnl +dnl AC_CHECK_POLL_H([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_CHECK_POLL_H, +[ +AC_MSG_CHECKING([for usable poll.h]) +AH_TEMPLATE(AS_TR_CPP(DCMTK_HAVE_POLL), [Define if your system has a usable ]) +AC_CACHE_VAL(ac_cv_header_poll_h, +[ +case "${host}" in + *-*-darwin*) + eval "ac_cv_header_poll_h=no" + ;; + *) + AC_TRY_CPP([#include ], eval "ac_cv_header_poll_h=yes", eval "ac_cv_header_poll_h=no")dnl + ;; +esac +]) +if eval "test \"`echo '$ac_cv_header_poll_h'`\" = yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE_UNQUOTED(DCMTK_HAVE_POLL) + ifelse([$1], , :, [$1]) +else + AC_MSG_RESULT(no) + ifelse([$2], , , [$2]) +fi +]) + + dnl AC_CHECK_TCP_H dnl checks for the presence of three system include files: dnl diff --git a/config/configure b/config/configure index 0518b650..d00cd4da 100755 --- a/config/configure +++ b/config/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dcmtk 3.6.2. +# Generated by GNU Autoconf 2.69 for dcmtk 3.6.3. # # Report bugs to . # @@ -579,9 +579,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dcmtk' -PACKAGE_TARNAME='dcmtk-3.6.2' -PACKAGE_VERSION='3.6.2' -PACKAGE_STRING='dcmtk 3.6.2' +PACKAGE_TARNAME='dcmtk-3.6.3' +PACKAGE_VERSION='3.6.3' +PACKAGE_STRING='dcmtk 3.6.3' PACKAGE_BUGREPORT='bugs@dcmtk.org' PACKAGE_URL='http://www.dcmtk.org/' @@ -1311,7 +1311,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dcmtk 3.6.2 to adapt to many kinds of systems. +\`configure' configures dcmtk 3.6.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1376,7 +1376,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dcmtk 3.6.2:";; + short | recursive ) echo "Configuration of dcmtk 3.6.3:";; esac cat <<\_ACEOF @@ -1545,7 +1545,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dcmtk configure 3.6.2 +dcmtk configure 3.6.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2405,7 +2405,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dcmtk $as_me 3.6.2, which was +It was created by dcmtk $as_me 3.6.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,9 +2827,9 @@ ac_config_headers="$ac_config_headers include/dcmtk/config/osconfig.h" -PACKAGE_VERSION_NUMBER=362 +PACKAGE_VERSION_NUMBER=363 PACKAGE_VERSION_SUFFIX="" -PACKAGE_DATE="2017-07-14" +PACKAGE_DATE="2018-02-05" cat >>confdefs.h <<_ACEOF @@ -8690,6 +8690,47 @@ fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable poll.h" >&5 +$as_echo_n "checking for usable poll.h... " >&6; } + +if ${ac_cv_header_poll_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + +case "${host}" in + *-*-darwin*) + eval "ac_cv_header_poll_h=no" + ;; + *) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + eval "ac_cv_header_poll_h=yes" +else + eval "ac_cv_header_poll_h=no" +fi +rm -f conftest.err conftest.i conftest.$ac_ext ;; +esac + +fi + +if eval "test \"`echo '$ac_cv_header_poll_h'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + cat >>confdefs.h <<_ACEOF +#define DCMTK_HAVE_POLL 1 +_ACEOF + + : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + if test $ac_cv_header_libc_h = yes ; then if test $ac_cv_header_math_h = yes ; then @@ -12911,7 +12952,7 @@ if ${ac_cv_check_std_namespace+:} false; then : else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < @@ -13383,7 +13424,7 @@ if ${ac_cv_check_class_template+:} false; then : else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < @@ -13455,7 +13496,7 @@ if ${ac_cv_check_static_template_method+:} false; then : else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < conftest.$ac_ext < @@ -17234,7 +17275,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dcmtk $as_me 3.6.2, which was +This file was extended by dcmtk $as_me 3.6.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17297,7 +17338,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dcmtk config.status 3.6.2 +dcmtk config.status 3.6.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/config/configure.in b/config/configure.in index b80d6db3..5cae189d 100644 --- a/config/configure.in +++ b/config/configure.in @@ -1,8 +1,8 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(dcmtk, 3.6.2, [bugs@dcmtk.org], [dcmtk-3.6.2], [http://www.dcmtk.org/]) +AC_INIT(dcmtk, 3.6.3, [bugs@dcmtk.org], [dcmtk-3.6.3], [http://www.dcmtk.org/]) AC_PREREQ(2.60) AC_CONFIG_SRCDIR(Makefile.in) -AC_CONFIG_HEADER(include/dcmtk/config/osconfig.h) +AC_CONFIG_HEADERS(include/dcmtk/config/osconfig.h) m4_include([stdcxx.m4]) @@ -10,9 +10,9 @@ dnl ------------------------------------------------------- dnl Additional Package Information dnl ------------------------------------------------------- -PACKAGE_VERSION_NUMBER=362 +PACKAGE_VERSION_NUMBER=363 PACKAGE_VERSION_SUFFIX="" -PACKAGE_DATE="2017-07-14" +PACKAGE_DATE="2018-02-05" AC_DEFINE_UNQUOTED(PACKAGE_VERSION_NUMBER,${PACKAGE_VERSION_NUMBER},[Define to the version number of this package.]) AC_DEFINE_UNQUOTED(PACKAGE_VERSION_SUFFIX,"${PACKAGE_VERSION_SUFFIX}",[Define to the version suffix of this package.]) @@ -545,6 +545,7 @@ AC_CHECK_HEADERS(utime.h) AC_CHECK_HEADERS(wchar.h) AC_CHECK_HEADERS(wctype.h) AC_CHECK_HEADERS(fenv.h) +AC_CHECK_POLL_H if test $ac_cv_header_libc_h = yes ; then if test $ac_cv_header_math_h = yes ; then @@ -947,7 +948,7 @@ AC_ARG_ENABLE(external-dict, *) AC_MSG_RESULT(no) dnl Reset default path so the dictionary is not loaded automatically on startup - AC_DEFINE_UNQUOTED(DCM_DICT_DEFAULT_PATH, "", [Empty default data dictionary path for the dcmdata library package.]) + AC_DEFINE_UNQUOTED(DCM_DICT_DEFAULT_PATH, "", [Define the default data dictionary path for the dcmdata library package.]) ;; esac ], AC_MSG_RESULT(yes) diff --git a/config/docs/CMakeLists.txt b/config/docs/CMakeLists.txt index e2e3bd1d..f2d42a1c 100644 --- a/config/docs/CMakeLists.txt +++ b/config/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES config.txt dirstruc.txt envvars.txt macros.txt modules.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) +INSTALL(FILES config.txt dirstruc.txt envvars.txt macros.txt modules.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git a/config/docs/macros.txt b/config/docs/macros.txt index d50b7b96..a7387886 100644 --- a/config/docs/macros.txt +++ b/config/docs/macros.txt @@ -135,17 +135,8 @@ DONT_DISABLE_NAGLE_ALGORITHM disabled by default. See DISABLE_NAGLE_ALGORITHM for details. DONT_LOAD_EXTERNAL_DICTIONARIES - Affected: dcmdata - Type of modification: Disables feature - Explanation: By default, DCMTK loads data dictionaries from files at - application start (before the main function is called). These files - are either specified by the DCMDICTPATH environment variable or the - default files are used. This flag disables the loading of external - dictionaries from file at application start, which might be useful - when only the builtin dictionary should be used. However, if no - dictionary gets loaded, this is likely to cause unexpected behavior. - Even if this flag is defined, the reloadDictionaries() method can be - used to load the external dictionaries after application start. + This macro is not supported anymore since it has been superseded by macro + ENABLE_EXTERNAL_DICTIONARY. See ENABLE_EXTERNAL_DICTIONARY for details. DOXYGEN Affected: everything @@ -164,8 +155,32 @@ ENABLE_BUILTIN_DICTIONARY Type of modification: Activates feature Explanation: If enabled, DCMTK's global builtin dictionary, that is always loaded on startup, is populated with known DICOM tags. Otherwise, the - builtin dictionary stays empty. For more further information about - dictionary configuration read dcmdata/docs/datadict.txt. + builtin dictionary stays empty. For further information about dictionary + configuration read dcmdata/docs/datadict.txt. + +ENABLE_EXTERNAL_DICTIONARY + Affected: dcmdata + Type of modification: Enables feature + Explanation: DCMTK is able to load DICOM data dictionaries from files at + application start (before the main function is called). These files + are either specified by the DCMDICTPATH environment variable or the + default files are used. This flag enables the loading of external + dictionaries from file at application start. Disabling it might be useful + when only the builtin dictionary should be used. However, if no + dictionary gets loaded, this is likely to cause unexpected behavior. + Even if this flag is disabled, the reloadDictionaries() method can be + used to load the external dictionaries after application start. + However, the environment variable DCMDICTPATH has to point to one or more + related dictionary files in that case, since if ENABLE_EXTERNAL_DICTIONARY + is disabled, no default dictionary path is set within the DCMTK code. + On Unix-like systems this flag is enabled by default while on Windows it is + disabled. For more information about dictionary configuration read + dcmdata/docs/datadict.txt. + Note that in former versions of DCMTK a macro called + DONT_LOAD_EXTERNAL_DICTIONARIES has been specified which now has been + replaced with ENABLE_EXTERNAL_DICTIONARY in order to be consistent with + the existing Autoconf and CMake configuration switches. See also entry for + DONT_LOAD_EXTERNAL_DICTIONARIES. EXPERIMENTAL_READ_FROM_FILE Affected: dump2dcm diff --git a/config/include/dcmtk/config/osconfig.h.in b/config/include/dcmtk/config/osconfig.h.in index aab5f420..fac7b226 100644 --- a/config/include/dcmtk/config/osconfig.h.in +++ b/config/include/dcmtk/config/osconfig.h.in @@ -54,10 +54,13 @@ /* Select LFS mode (defined above) that shall be used or don't define it */ #undef DCMTK_ENABLE_LFS +/* Define if your system has a usable */ +#undef DCMTK_HAVE_POLL + /* Define the DCMTK default path. */ #undef DCMTK_PREFIX -/* Empty default data dictionary path for the dcmdata library package. */ +/* Define the default data dictionary path for the dcmdata library package. */ #undef DCM_DICT_DEFAULT_PATH /* Define the default directory where configuration files reside. */ diff --git a/config/rootconf b/config/rootconf index 62343bcc..27260d5b 100755 --- a/config/rootconf +++ b/config/rootconf @@ -225,14 +225,47 @@ elif test "x--help=recursive" = "x\$*"; then config/configure --help=recursive elif test "x--version" = "x\$*"; then config/configure --version +elif test "x-h" = "x\$*"; then + config/configure -h +elif test "x-V" = "x\$*"; then + config/configure -V else + args="" + ok=0 + while [ \$# -gt 0 ]; do + if test "x--ignore-deprecation" = "x\$1"; then + ok=1 + else + args="\$args \$1" + fi + shift + done + if [ \$ok -eq 0 ]; then + echo "" + echo "== DEPRECATION WARNING ==" + echo "" + echo "Configuring DCMTK via GNU Autoconf is deprecated and will be removed. Please have" + echo "a look at CMake, which we now consider equally mature. If you run into serious" + echo "problems using CMake or strongly prefer GNU Autoconf for some other reason write" + echo "an email to the" + echo "" + echo " DCMTK Team " + echo "" + echo "and use" + echo "" + echo " ./configure --ignore-deprecation" + echo "" + echo "to run the old configure script anyway." + echo "" + exit 1 + fi for module in \$modules ; do echo "Running configure for module \$module." if test ! -x "\$module/configure" ; then echo "Module \$module does not contain a configure script!" >&2 exit 1 fi - (cd \$module && ./configure \$* ) || exit 1 + (cd \$module && ./configure \$args ) || exit 1 done fi EOF diff --git a/configure b/configure index ca98151c..095fc68a 100755 --- a/configure +++ b/configure @@ -24,13 +24,46 @@ elif test "x--help=recursive" = "x$*"; then config/configure --help=recursive elif test "x--version" = "x$*"; then config/configure --version +elif test "x-h" = "x$*"; then + config/configure -h +elif test "x-V" = "x$*"; then + config/configure -V else + args="" + ok=0 + while [ $# -gt 0 ]; do + if test "x--ignore-deprecation" = "x$1"; then + ok=1 + else + args="$args $1" + fi + shift + done + if [ $ok -eq 0 ]; then + echo "" + echo "== DEPRECATION WARNING ==" + echo "" + echo "Configuring DCMTK via GNU Autoconf is deprecated and will be removed. Please have" + echo "a look at CMake, which we now consider equally mature. If you run into serious" + echo "problems using CMake or strongly prefer GNU Autoconf for some other reason write" + echo "an email to the" + echo "" + echo " DCMTK Team " + echo "" + echo "and use" + echo "" + echo " ./configure --ignore-deprecation" + echo "" + echo "to run the old configure script anyway." + echo "" + exit 1 + fi for module in $modules ; do echo "Running configure for module $module." if test ! -x "$module/configure" ; then echo "Module $module does not contain a configure script!" >&2 exit 1 fi - (cd $module && ./configure $* ) || exit 1 + (cd $module && ./configure $args ) || exit 1 done fi diff --git a/dcmdata/apps/mdfconen.cc b/dcmdata/apps/mdfconen.cc index 0f3d2be9..8119546c 100644 --- a/dcmdata/apps/mdfconen.cc +++ b/dcmdata/apps/mdfconen.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2014, OFFIS e.V. + * Copyright (C) 2003-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -15,7 +15,7 @@ * * Author: Michael Onken * - * Purpose: Class for modifying DICOM files from comandline + * Purpose: Class for modifying DICOM files from commandline * */ @@ -551,7 +551,7 @@ int MdfConsoleEngine::startProvidingService() } } } - // errors occured and user doesn't want to ignore them: + // errors occurred and user doesn't want to ignore them: else if (!no_backup_option && !was_created) { result = restoreFile(filename); diff --git a/dcmdata/apps/mdfconen.h b/dcmdata/apps/mdfconen.h index 55fc886f..7c1462bf 100644 --- a/dcmdata/apps/mdfconen.h +++ b/dcmdata/apps/mdfconen.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2010, OFFIS e.V. + * Copyright (C) 2003-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -15,7 +15,7 @@ * * Author: Michael Onken * - * Purpose: Class for modifying DICOM files from comandline + * Purpose: Class for modifying DICOM files from commandline * */ @@ -59,7 +59,7 @@ public : /** This class encapsulates data structures and operations for modifying - * Dicom files from the commandline + * DICOM files from the commandline */ class MdfConsoleEngine { @@ -82,7 +82,7 @@ public: /** This function looks at commandline options and decides what to do. * It evaluates option values from commandline and prepares them for * starting the corresponding private functions. - * @return Returns 0 if successful, another value if errors occurreds + * @return Returns 0 if successful, another value if errors occurred */ int startProvidingService(); @@ -109,7 +109,7 @@ protected: /** This function splits a modify option (inclusive value) as * found on commandline into to parts (path and value) * e.g. "(0010,0010)=value" into path "(0010,0010)" and "value" - * @param whole string to be splitted + * @param whole string to be split * @param path returns part containing the path * @param value returns part containing the value(if theres one) */ @@ -120,7 +120,7 @@ protected: /** Executes given modify job * @param job job to be executed * @param filename name of the file to be processed (optional) - * @return returns 0 if no error occured, else the number of errors + * @return returns 0 if no error occurred, else the number of errors */ int executeJob(const MdfJob &job, const char *filename = NULL); @@ -167,7 +167,7 @@ private: /// read file with or without metaheader E_FileReadMode read_mode_option; - /// denotes the expected transfersyntax + /// denotes the expected transfer syntax E_TransferSyntax input_xfer_option; /// decides whether to with/without metaheader @@ -176,7 +176,7 @@ private: /// denotes the transfer syntax that should be written E_TransferSyntax output_xfer_option; - /// option for group length recalcing + /// option for group length recalculation E_GrpLenEncoding glenc_option; /// write explicit or implicit length encoding diff --git a/dcmdata/apps/mdfdsman.cc b/dcmdata/apps/mdfdsman.cc index 2a7ac2dd..974a9f1e 100644 --- a/dcmdata/apps/mdfdsman.cc +++ b/dcmdata/apps/mdfdsman.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2013, OFFIS e.V. + * Copyright (C) 2003-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -100,7 +100,7 @@ static DcmTagKey getTagKeyFromDictionary(OFString tag) DcmTagKey key(0xffff,0xffff); const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock(); const DcmDictEntry *dicent = globalDataDict.findEntry(tag.c_str()); - // successfull lookup in dictionary -> translate to tag and return + // successful lookup in dictionary -> translate to tag and return if (dicent) { key = dicent->getKey(); @@ -299,7 +299,7 @@ static OFCondition splitTagPath(OFString &tag_path, OFCondition MdfDatasetManager::modifyOrInsertPath(OFString tag_path, const OFString &value, - const OFBool &only_modify, + const OFBool only_modify, const OFBool update_metaheader, const OFBool ignore_missing_tags, const OFBool no_reservation_checks) @@ -369,7 +369,7 @@ OFCondition MdfDatasetManager::modifyOrInsertPath(OFString tag_path, OFCondition MdfDatasetManager::modifyOrInsertFromFile(OFString tag_path, const OFString &filename, - const OFBool &only_modify, + const OFBool only_modify, const OFBool update_metaheader, const OFBool ignore_missing_tags, const OFBool no_reservation_checks) @@ -723,7 +723,7 @@ OFBool MdfDatasetManager::isTagInDictionary(const DcmTagKey &search_key) { const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock(); const DcmDictEntry *dicent = globalDataDict.findEntry(search_key,NULL); - // successfull lookup in dictionary -> translate to tag and return + // successful lookup in dictionary -> translate to tag and return dcmDataDict.unlock(); if (dicent) return OFTrue; diff --git a/dcmdata/apps/mdfdsman.h b/dcmdata/apps/mdfdsman.h index 4303402c..4e0596dc 100644 --- a/dcmdata/apps/mdfdsman.h +++ b/dcmdata/apps/mdfdsman.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2016, OFFIS e.V. + * Copyright (C) 2003-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -80,7 +80,7 @@ public: */ OFCondition modifyOrInsertPath(OFString tag_path, const OFString &value, - const OFBool &only_modify, + const OFBool only_modify, const OFBool update_metaheader = OFTrue, const OFBool ignore_missing_tags = OFFalse, const OFBool no_reservation_checks = OFFalse); @@ -102,7 +102,7 @@ public: */ OFCondition modifyOrInsertFromFile(OFString tag_path, const OFString &filename, - const OFBool &only_modify, + const OFBool only_modify, const OFBool update_metaheader = OFTrue, const OFBool ignore_missing_tags = OFFalse, const OFBool no_reservation_checks = OFFalse); @@ -112,10 +112,9 @@ public: * @param value denotes new value of tag * @param update_metaheader if true, metaheader UIDs are updated, * if related dataset UIDs are changed, (default=true) - * @param count returns holds the number of tags, that were affected + * @param count returns the number of tags that were affected * @param ignore_missing_tags if true, tags that could not be found - * while modifying (only_modify must be true) - * are handled as non-errors + * while modifying are handled as non-errors * @return returns EC_Normal if everything is OK, else an error */ OFCondition modifyAllTags(OFString tag_path, @@ -129,8 +128,7 @@ public: * @param all_tags if true, tag is deleted at all levels of dataset, * else only 1st level is accessed * @param ignore_missing_tags if true, tags that could not be found - * while modifying (only_modify must be true) - * are handled as non-errors + * while modifying are handled as non-errors * @return returns EC_Normal if everything is OK, else an error */ OFCondition deleteTag(OFString tag_path, @@ -155,13 +153,13 @@ public: /** Saves current dataset back to a file. Caution: After saving * MdfDatasetManager keeps working on old filename. * @param file_name filename to save to - * @param opt_xfer transfer syntax to save to (EXS_Unknown: dont change) + * @param opt_xfer transfer syntax to save to (EXS_Unknown: don't change) * @param opt_enctype write with explicit or implicit length encoding * @param opt_glenc option to set group length calculation mode * @param opt_padenc sets padding option * @param opt_filepad pad file to a multiple of this options value * @param opt_itempad pad item to a multiple of this options value - * @param opt_dataset if true:ony write only dataset, else write fileformat + * @param opt_dataset if true, write only dataset, else write fileformat * @return returns EC_Normal if everything is OK, else an error */ OFCondition saveFile(const char *file_name, @@ -179,24 +177,24 @@ public: */ OFCondition saveFile(); - /** Returns the dataset, that this MdfDatasetManager handles. - * You should use the returned object with care to avoid - * sideeffects with other class methods, that modify this object, too. + /** Returns the dataset that this MdfDatasetManager handles. + * You should use the returned object with care to avoid side effects with + * other class methods that modify this object, too. * @return returns the dataset, this MdfDatasetManager manages and NULL, if * no dataset is loaded */ DcmDataset* getDataset(); - /** Returns the DcmFileFormat, that this MdfDatasetManager handles. - * You should use the returned object with care to avoid - * side-effects with other class methods, that modify this object, too. + /** Returns the DcmFileFormat that this MdfDatasetManager handles. + * You should use the returned object with care to avoid side-effects with + * other class methods that modify this object, too. * @return returns the DcmFileFormat, this MdfDatasetManager manages and * NULL, if no file is loaded */ DcmFileFormat* getFileFormat(); - /** Returns filename of the file, that's loaded currently. + /** Returns filename of the file that is currently loaded. * @return returns filename and "" if no file is loaded. */ OFString getFilename() const; @@ -210,7 +208,7 @@ public: protected: /** modifies element to a specific value - * @param elem element, that should be changed + * @param elem element that should be changed * @param value the value, the element should be changed to * @return OFCondition, which returns an error code if an error occurs */ @@ -233,13 +231,13 @@ protected: private: - /// name of file, that is loaded currently + /// name of file that is currently loaded OFString current_file; /// will hold file to modify DcmFileFormat *dfile; - /// will hold the dataset, that should be modified + /// will hold the dataset that should be modified DcmDataset *dset; /// if enabled, no value modifications on attributes having VR of UN diff --git a/dcmdata/apps/xml2dcm.cc b/dcmdata/apps/xml2dcm.cc index 39b01cac..c195b805 100644 --- a/dcmdata/apps/xml2dcm.cc +++ b/dcmdata/apps/xml2dcm.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2017, OFFIS e.V. + * Copyright (C) 2003-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -205,7 +205,7 @@ static OFCondition createNewElement(xmlNodePtr current, } if (result.bad()) { - /* delete new element if an error occured */ + /* delete new element if an error occurred */ delete newElem; newElem = NULL; } @@ -243,7 +243,7 @@ static OFCondition putElementContent(xmlNodePtr current, /* Base64 decoder produces big endian output data, convert to local byte order */ swapIfNecessary(gLocalByteOrder, EBO_BigEndian, data, OFstatic_cast(Uint32, length), sizeof(Uint16)); } - result = element->putUint8Array(data, length); + result = element->putUint8Array(data, OFstatic_cast(Uint32, length)); /* delete buffer since data is copied into the element */ delete[] data; } @@ -260,7 +260,7 @@ static OFCondition putElementContent(xmlNodePtr current, { /* determine filesize */ const size_t fileSize = OFStandard::getFileSize(filename); - unsigned long buflen = fileSize; + size_t buflen = fileSize; /* if odd then make even (DICOM requires even length values) */ if (buflen & 1) buflen++; diff --git a/dcmdata/data/CMakeLists.txt b/dcmdata/data/CMakeLists.txt index 0879cda7..425c7e66 100644 --- a/dcmdata/data/CMakeLists.txt +++ b/dcmdata/data/CMakeLists.txt @@ -1,5 +1,5 @@ # declare installation files -INSTALL(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data) +INSTALL(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION "${CMAKE_INSTALL_DATADIR}/dcmtk" COMPONENT data) # add paths to the dictionaries to a CMake variable for being used by the unit tests SET(DCMTK_DICOM_DICTIONARIES diff --git a/dcmdata/data/dicom.dic b/dcmdata/data/dicom.dic index 3d9e89c2..5cc57235 100644 --- a/dcmdata/data/dicom.dic +++ b/dcmdata/data/dicom.dic @@ -21,8 +21,9 @@ # DICONDE (Digital Imaging and Communication in Nondestructive Evaluation) and # DICOS (Digital Imaging and Communications in Security) standard. # -# Generated automatically from DICOM PS 3.6-2017b and PS 3.7-2017b -# File created on 2017-06-15 10:31:09 by J. Riesmeier on thinkpad. +# Generated automatically from DICOM PS 3.6-2017e and PS 3.7-2017e +# File created on 2017-12-05 09:13:43 by J. Riesmeier on thinkpad. +# Last modified on 2017-12-07 by J. Riesmeier. # # In addition, the data dictionary entries from the following final text # supplements and correction items (CP) have been incorporated: @@ -129,6 +130,7 @@ (0008,0060) CS Modality 1 DICOM (0008,0061) CS ModalitiesInStudy 1-n DICOM (0008,0062) UI SOPClassesInStudy 1-n DICOM +(0008,0063) SQ AnatomicRegionsInStudyCodeSequence 1 DICOM (0008,0064) CS ConversionType 1 DICOM (0008,0068) CS PresentationIntentType 1 DICOM (0008,0070) LO Manufacturer 1 DICOM @@ -150,9 +152,12 @@ (0008,0106) DT ContextGroupVersion 1 DICOM (0008,0107) DT ContextGroupLocalVersion 1 DICOM (0008,0108) LT ExtendedCodeMeaning 1 DICOM/DICOS +(0008,0109) SQ CodingSchemeResourcesSequence 1 DICOM +(0008,010A) CS CodingSchemeURLType 1 DICOM (0008,010B) CS ContextGroupExtensionFlag 1 DICOM (0008,010C) UI CodingSchemeUID 1 DICOM (0008,010D) UI ContextGroupExtensionCreatorUID 1 DICOM +(0008,010E) UR CodingSchemeURL 1 DICOM (0008,010F) CS ContextIdentifier 1 DICOM (0008,0110) SQ CodingSchemeIdentificationSequence 1 DICOM (0008,0112) LO CodingSchemeRegistry 1 DICOM @@ -253,7 +258,6 @@ (0008,2218) SQ AnatomicRegionSequence 1 DICOM (0008,2220) SQ AnatomicRegionModifierSequence 1 DICOM (0008,2228) SQ PrimaryAnatomicStructureSequence 1 DICOM -(0008,2229) SQ AnatomicStructureSpaceOrRegionSequence 1 DICOM (0008,2230) SQ PrimaryAnatomicStructureModifierSequence 1 DICOM (0008,3001) SQ AlternateRepresentationSequence 1 DICOM (0008,3010) UI IrradiationEventUID 1-n DICOM @@ -358,6 +362,8 @@ (0012,0042) LO ClinicalTrialSubjectReadingID 1 DICOM (0012,0050) LO ClinicalTrialTimePointID 1 DICOM (0012,0051) ST ClinicalTrialTimePointDescription 1 DICOM +(0012,0052) FD LongitudinalTemporalOffsetFromEvent 1 DICOM +(0012,0053) CS LongitudinalTemporalEventType 1 DICOM (0012,0060) LO ClinicalTrialCoordinatingCenterName 1 DICOM (0012,0062) CS PatientIdentityRemoved 1 DICOM (0012,0063) LO DeidentificationMethod 1-n DICOM @@ -716,7 +722,9 @@ (0018,1191) CS AnodeTargetMaterial 1 DICOM (0018,11A0) DS BodyPartThickness 1 DICOM (0018,11A2) DS CompressionForce 1 DICOM +(0018,11A3) DS CompressionPressure 1 DICOM (0018,11A4) LO PaddleDescription 1 DICOM +(0018,11A5) DS CompressionContactArea 1 DICOM (0018,1200) DA DateOfLastCalibration 1-n DICOM (0018,1201) TM TimeOfLastCalibration 1-n DICOM (0018,1202) DT DateTimeOfLastCalibration 1 DICOM @@ -1979,12 +1987,9 @@ (0040,0294) DS Quantity 1 DICOM (0040,0295) SQ MeasuringUnitsSequence 1 DICOM (0040,0296) SQ BillingItemSequence 1 DICOM -(0040,0300) US TotalTimeOfFluoroscopy 1 DICOM -(0040,0301) US TotalNumberOfExposures 1 DICOM (0040,0302) US EntranceDose 1 DICOM (0040,0303) US ExposedArea 1-2 DICOM (0040,0306) DS DistanceSourceToEntrance 1 DICOM -(0040,030E) SQ ExposureDoseSequence 1 DICOM (0040,0310) ST CommentsOnRadiationDose 1 DICOM (0040,0312) DS XRayOutput 1 DICOM (0040,0314) DS HalfValueLayer 1 DICOM @@ -2054,7 +2059,6 @@ (0040,4011) DT ExpectedCompletionDateTime 1 DICOM (0040,4018) SQ ScheduledWorkitemCodeSequence 1 DICOM (0040,4019) SQ PerformedWorkitemCodeSequence 1 DICOM -(0040,4020) CS InputAvailabilityFlag 1 DICOM (0040,4021) SQ InputInformationSequence 1 DICOM (0040,4025) SQ ScheduledStationNameCodeSequence 1 DICOM (0040,4026) SQ ScheduledStationClassCodeSequence 1 DICOM @@ -2181,6 +2185,17 @@ (0044,0012) LO SubstanceAdministrationDeviceID 1 DICOM (0044,0013) SQ ProductParameterSequence 1 DICOM (0044,0019) SQ SubstanceAdministrationParameterSequence 1 DICOM +(0044,0100) SQ ApprovalSequence 1 DICOM +(0044,0101) SQ AssertionCodeSequence 1 DICOM +(0044,0102) UI AssertionUID 1 DICOM +(0044,0103) SQ AsserterIdentificationSequence 1 DICOM +(0044,0104) DT AssertionDateTime 1 DICOM +(0044,0105) DT AssertionExpirationDateTime 1 DICOM +(0044,0106) UT AssertionComments 1 DICOM +(0044,0107) SQ RelatedAssertionSequence 1 DICOM +(0044,0108) UI ReferencedAssertionUID 1 DICOM +(0044,0109) SQ ApprovalSubjectSequence 1 DICOM +(0044,010A) SQ OrganizationalRoleCodeSequence 1 DICOM (0046,0012) LO LensDescription 1 DICOM (0046,0014) SQ RightLensSequence 1 DICOM (0046,0015) SQ LeftLensSequence 1 DICOM @@ -2888,6 +2903,7 @@ (0074,1002) SQ ProcedureStepProgressInformationSequence 1 DICOM (0074,1004) DS ProcedureStepProgress 1 DICOM (0074,1006) ST ProcedureStepProgressDescription 1 DICOM +(0074,1007) SQ ProcedureStepProgressParametersSequence 1 DICOM (0074,1008) SQ ProcedureStepCommunicationsURISequence 1 DICOM (0074,100A) UR ContactURI 1 DICOM (0074,100C) LO ContactDisplayName 1 DICOM @@ -3012,7 +3028,7 @@ (0082,0007) SQ AssessmentObservationsSequence 1 DICOM (0082,0008) CS ObservationSignificance 1 DICOM (0082,000A) UT ObservationDescription 1 DICOM -(0082,000C) SQ StructuredContraintObservationSequence 1 DICOM +(0082,000C) SQ StructuredConstraintObservationSequence 1 DICOM (0082,0010) SQ AssessedAttributeValueSequence 1 DICOM (0082,0016) LO AssessmentSetID 1 DICOM (0082,0017) SQ AssessmentRequesterSequence 1 DICOM @@ -3389,14 +3405,15 @@ (300A,0083) UI ReferencedDoseReferenceUID 1 DICOM (300A,0084) DS BeamDose 1 DICOM (300A,0086) DS BeamMeterset 1 DICOM +(300A,0088) FL BeamDosePointDepth 1 DICOM +(300A,0089) FL BeamDosePointEquivalentDepth 1 DICOM +(300A,008A) FL BeamDosePointSSD 1 DICOM (300A,008B) CS BeamDoseMeaning 1 DICOM (300A,008C) SQ BeamDoseVerificationControlPointSequence 1 DICOM -(300A,008D) FL AverageBeamDosePointDepth 1 DICOM -(300A,008E) FL AverageBeamDosePointEquivalentDepth 1 DICOM -(300A,008F) FL AverageBeamDosePointSSD 1 DICOM (300A,0090) CS BeamDoseType 1 DICOM (300A,0091) DS AlternateBeamDose 1 DICOM (300A,0092) CS AlternateBeamDoseType 1 DICOM +(300A,0093) CS DepthValueAveragingFlag 1 DICOM (300A,00A0) IS NumberOfBrachyApplicationSetups 1 DICOM (300A,00A2) DS BrachyApplicationSetupDoseSpecificationPoint 3 DICOM (300A,00A4) DS BrachyApplicationSetupDose 1 DICOM @@ -3580,6 +3597,10 @@ (300A,0266) LO BrachyAccessoryDeviceName 1 DICOM (300A,026A) DS BrachyAccessoryDeviceNominalThickness 1 DICOM (300A,026C) DS BrachyAccessoryDeviceNominalTransmission 1 DICOM +(300A,0271) DS ChannelEffectiveLength 1 DICOM +(300A,0272) DS ChannelInnerLength 1 DICOM +(300A,0273) SH AfterloaderChannelID 1 DICOM +(300A,0274) DS SourceApplicatorTipLength 1 DICOM (300A,0280) SQ ChannelSequence 1 DICOM (300A,0282) IS ChannelNumber 1 DICOM (300A,0284) DS ChannelLength 1 DICOM @@ -3926,6 +3947,7 @@ (0008,2200) CS RETIRED_TransducerPosition 1 DICOM/retired (0008,2204) CS RETIRED_TransducerOrientation 1 DICOM/retired (0008,2208) CS RETIRED_AnatomicStructure 1 DICOM/retired +(0008,2229) SQ RETIRED_AnatomicStructureSpaceOrRegionSequence 1 DICOM/retired (0008,2240) SQ RETIRED_TransducerPositionSequence 1 DICOM/retired (0008,2242) SQ RETIRED_TransducerPositionModifierSequence 1 DICOM/retired (0008,2244) SQ RETIRED_TransducerOrientationSequence 1 DICOM/retired @@ -4104,7 +4126,10 @@ (0038,0040) LO RETIRED_DischargeDiagnosisDescription 1 DICOM/retired (0038,0044) SQ RETIRED_DischargeDiagnosisCodeSequence 1 DICOM/retired (0038,0061) LO RETIRED_IssuerOfServiceEpisodeID 1 DICOM/retired +(0040,0300) US RETIRED_TotalTimeOfFluoroscopy 1 DICOM/retired +(0040,0301) US RETIRED_TotalNumberOfExposures 1 DICOM/retired (0040,0307) DS RETIRED_DistanceSourceToSupport 1 DICOM/retired +(0040,030E) SQ RETIRED_ExposureDoseSequence 1 DICOM/retired (0040,0330) SQ RETIRED_ReferencedProcedureStepSequence 1 DICOM/retired (0040,050A) LO RETIRED_SpecimenAccessionNumber 1 DICOM/retired (0040,0550) SQ RETIRED_SpecimenSequence 1 DICOM/retired @@ -4127,6 +4152,7 @@ (0040,4006) CS RETIRED_MultipleCopiesFlag 1 DICOM/retired (0040,4015) SQ RETIRED_ResultingGeneralPurposePerformedProcedureStepsSequence 1 DICOM/retired (0040,4016) SQ RETIRED_ReferencedGeneralPurposeScheduledProcedureStepSequence 1 DICOM/retired +(0040,4020) CS RETIRED_InputAvailabilityFlag 1 DICOM/retired (0040,4022) SQ RETIRED_RelevantInformationSequence 1 DICOM/retired (0040,4023) UI RETIRED_ReferencedGeneralPurposeScheduledProcedureStepTransactionUID 1 DICOM/retired (0040,4031) SQ RETIRED_RequestedSubsequentWorkitemCodeSequence 1 DICOM/retired @@ -4258,9 +4284,9 @@ (3006,00C0) SQ RETIRED_FrameOfReferenceRelationshipSequence 1 DICOM/retired (3006,00C2) UI RETIRED_RelatedFrameOfReferenceUID 1 DICOM/retired (3006,00C4) CS RETIRED_FrameOfReferenceTransformationType 1 DICOM/retired -(300A,0088) FL RETIRED_BeamDosePointDepth 1 DICOM/retired -(300A,0089) FL RETIRED_BeamDosePointEquivalentDepth 1 DICOM/retired -(300A,008A) FL RETIRED_BeamDosePointSSD 1 DICOM/retired +(300A,008D) FL RETIRED_AverageBeamDosePointDepth 1 DICOM/retired +(300A,008E) FL RETIRED_AverageBeamDosePointEquivalentDepth 1 DICOM/retired +(300A,008F) FL RETIRED_AverageBeamDosePointSSD 1 DICOM/retired (4000,0010) LT RETIRED_Arbitrary 1 DICOM/retired (4000,4000) LT RETIRED_TextComments 1 DICOM/retired (4008,0040) SH RETIRED_ResultsID 1 DICOM/retired @@ -4367,177 +4393,16 @@ # #--------------------------------------------------------------------------- # -# Retired data elements from previous editions of the DICOM standard +# Retired data elements from previous editions of the DICOM standard. +# (This section is not generated automatically but added manually.) # -(0000,0001) UL RETIRED_CommandLengthToEnd 1 DICOM/retired -(0000,0010) SH RETIRED_CommandRecognitionCode 1 DICOM/retired -(0000,0200) AE RETIRED_Initiator 1 DICOM/retired -(0000,0300) AE RETIRED_Receiver 1 DICOM/retired -(0000,0400) AE RETIRED_FindLocation 1 DICOM/retired -(0000,0850) US RETIRED_NumberOfMatches 1 DICOM/retired -(0000,0860) US RETIRED_ResponseSequenceNumber 1 DICOM/retired -(0000,4000) LT RETIRED_DialogReceiver 1 DICOM/retired -(0000,4010) LT RETIRED_TerminalType 1 DICOM/retired -(0000,5010) SH RETIRED_MessageSetID 1 DICOM/retired -(0000,5020) SH RETIRED_EndMessageID 1 DICOM/retired -(0000,5110) LT RETIRED_DisplayFormat 1 DICOM/retired -(0000,5120) LT RETIRED_PagePositionID 1 DICOM/retired -(0000,5130) CS RETIRED_TextFormatID 1 DICOM/retired -(0000,5140) CS RETIRED_NormalReverse 1 DICOM/retired -(0000,5150) CS RETIRED_AddGrayScale 1 DICOM/retired -(0000,5160) CS RETIRED_Borders 1 DICOM/retired -(0000,5170) IS RETIRED_Copies 1 DICOM/retired -(0000,5180) CS RETIRED_CommandMagnificationType 1 DICOM/retired -(0000,5190) CS RETIRED_Erase 1 DICOM/retired -(0000,51A0) CS RETIRED_Print 1 DICOM/retired -(0000,51B0) US RETIRED_Overlays 1-n DICOM/retired -(0004,1504) up RETIRED_MRDRDirectoryRecordOffset 1 DICOM/retired -(0004,1600) UL RETIRED_NumberOfReferences 1 DICOM/retired -(0008,0001) UL RETIRED_LengthToEnd 1 DICOM/retired -(0008,0010) SH RETIRED_RecognitionCode 1 DICOM/retired -(0008,0024) DA RETIRED_OverlayDate 1 DICOM/retired -(0008,0025) DA RETIRED_CurveDate 1 DICOM/retired -(0008,0034) TM RETIRED_OverlayTime 1 DICOM/retired -(0008,0035) TM RETIRED_CurveTime 1 DICOM/retired -(0008,0040) US RETIRED_DataSetType 1 DICOM/retired -(0008,0041) LO RETIRED_DataSetSubtype 1 DICOM/retired -(0008,0042) CS RETIRED_NuclearMedicineSeriesType 1 DICOM/retired -(0008,1000) AE RETIRED_NetworkID 1 DICOM/retired -(0008,1100) SQ RETIRED_ReferencedResultsSequence 1 DICOM/retired -(0008,1130) SQ RETIRED_ReferencedOverlaySequence 1 DICOM/retired -(0008,1145) SQ RETIRED_ReferencedCurveSequence 1 DICOM/retired -(0008,2110) CS RETIRED_LossyImageCompressionRetired 1 DICOM/retired -(0008,2200) CS RETIRED_TransducerPosition 1 DICOM/retired -(0008,2204) CS RETIRED_TransducerOrientation 1 DICOM/retired -(0008,2208) CS RETIRED_AnatomicStructure 1 DICOM/retired -(0008,2240) SQ RETIRED_TransducerPositionSequence 1 DICOM/retired -(0008,2242) SQ RETIRED_TransducerPositionModifierSequence 1 DICOM/retired -(0008,2244) SQ RETIRED_TransducerOrientationSequence 1 DICOM/retired -(0008,2246) SQ RETIRED_TransducerOrientationModifierSequence 1 DICOM/retired -(0008,2251) SQ RETIRED_AnatomicStructureSpaceOrRegionCodeSequenceTrial 1 DICOM/retired -(0008,2253) SQ RETIRED_AnatomicPortalOfEntranceCodeSequenceTrial 1 DICOM/retired -(0008,2255) SQ RETIRED_AnatomicApproachDirectionCodeSequenceTrial 1 DICOM/retired -(0008,2256) ST RETIRED_AnatomicPerspectiveDescriptionTrial 1 DICOM/retired -(0008,2257) SQ RETIRED_AnatomicPerspectiveCodeSequenceTrial 1 DICOM/retired -(0008,2258) ST RETIRED_AnatomicLocationOfExaminingInstrumentDescriptionTrial 1 DICOM/retired -(0008,2259) SQ RETIRED_AnatomicLocationOfExaminingInstrumentCodeSequenceTrial 1 DICOM/retired -(0008,225A) SQ RETIRED_AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial 1 DICOM/retired -(0008,225C) SQ RETIRED_OnAxisBackgroundAnatomicStructureCodeSequenceTrial 1 DICOM/retired -(0008,4000) LT RETIRED_IdentifyingComments 1 DICOM/retired -(0010,1050) LO RETIRED_InsurancePlanIdentification 1-n DICOM/retired -(0014,0023) ST RETIRED_CADFileFormat 1-n DICOM/retired -(0014,0024) ST RETIRED_ComponentReferenceSystem 1-n DICOM/retired -(0014,0045) ST RETIRED_MaterialPropertiesFileFormatRetired 1-n DICOM/retired -(0018,0030) LO RETIRED_Radionuclide 1-n DICOM/retired -(0018,0032) DS RETIRED_EnergyWindowCenterline 1 DICOM/retired -(0018,0033) DS RETIRED_EnergyWindowTotalWidth 1-n DICOM/retired -(0018,0037) CS RETIRED_TherapyType 1 DICOM/retired -(0018,0039) CS RETIRED_TherapyDescription 1 DICOM/retired -(0018,1011) LO RETIRED_HardcopyCreationDeviceID 1 DICOM/retired -(0018,1017) LO RETIRED_HardcopyDeviceManufacturer 1 DICOM/retired -(0018,101A) LO RETIRED_HardcopyDeviceSoftwareVersion 1-n DICOM/retired -(0018,101B) LO RETIRED_HardcopyDeviceManufacturerModelName 1 DICOM/retired -(0018,1141) DS RETIRED_AngularPosition 1 DICOM/retired -(0018,1146) DS RETIRED_RotationOffset 1-n DICOM/retired -(0018,1240) IS RETIRED_UpperLowerPixelValues 1-n DICOM/retired -(0018,4000) LT RETIRED_AcquisitionComments 1 DICOM/retired -(0018,5021) LO RETIRED_PostprocessingFunction 1 DICOM/retired -(0018,5030) DS RETIRED_DynamicRange 1 DICOM/retired -(0018,5040) DS RETIRED_TotalGain 1 DICOM/retired -(0018,5210) DS RETIRED_ImageTransformationMatrix 6 DICOM/retired -(0018,5212) DS RETIRED_ImageTranslationVector 3 DICOM/retired -(0018,6038) UL RETIRED_DopplerSampleVolumeXPositionRetired 1 DICOM/retired -(0018,603A) UL RETIRED_DopplerSampleVolumeYPositionRetired 1 DICOM/retired -(0018,603C) UL RETIRED_TMLinePositionX0Retired 1 DICOM/retired -(0018,603E) UL RETIRED_TMLinePositionY0Retired 1 DICOM/retired -(0018,6040) UL RETIRED_TMLinePositionX1Retired 1 DICOM/retired -(0018,6042) UL RETIRED_TMLinePositionY1Retired 1 DICOM/retired -(0018,9096) FD RETIRED_ParallelReductionFactorInPlaneRetired 1 DICOM/retired -(0018,9166) CS RETIRED_BulkMotionStatus 1 DICOM/retired -(0018,9195) FD RETIRED_ChemicalShiftMinimumIntegrationLimitInHz 1 DICOM/retired -(0018,9196) FD RETIRED_ChemicalShiftMaximumIntegrationLimitInHz 1 DICOM/retired -(0020,0014) IS RETIRED_IsotopeNumber 1 DICOM/retired -(0020,0015) IS RETIRED_PhaseNumber 1 DICOM/retired -(0020,0016) IS RETIRED_IntervalNumber 1 DICOM/retired -(0020,0017) IS RETIRED_TimeSlotNumber 1 DICOM/retired -(0020,0018) IS RETIRED_AngleNumber 1 DICOM/retired -(0020,0022) IS RETIRED_OverlayNumber 1 DICOM/retired -(0020,0024) IS RETIRED_CurveNumber 1 DICOM/retired -(0020,0026) IS RETIRED_LUTNumber 1 DICOM/retired -(0020,0030) DS RETIRED_ImagePosition 3 DICOM/retired -(0020,0035) DS RETIRED_ImageOrientation 6 DICOM/retired -(0020,0050) DS RETIRED_Location 1 DICOM/retired -(0020,0070) LO RETIRED_ImageGeometryType 1 DICOM/retired -(0020,0080) CS RETIRED_MaskingImage 1-n DICOM/retired -(0020,00AA) IS RETIRED_ReportNumber 1 DICOM/retired -(0020,1000) IS RETIRED_SeriesInStudy 1 DICOM/retired -(0020,1001) IS RETIRED_AcquisitionsInSeries 1 DICOM/retired -(0020,1003) IS RETIRED_ImagesInSeries 1 DICOM/retired -(0020,1004) IS RETIRED_AcquisitionsInStudy 1 DICOM/retired -(0020,1005) IS RETIRED_ImagesInStudy 1 DICOM/retired -(0020,1020) LO RETIRED_Reference 1-n DICOM/retired -(0020,1070) IS RETIRED_OtherStudyNumbers 1-n DICOM/retired -(0020,3100-31FF) CS RETIRED_SourceImageIDs 1-n DICOM/retired -(0020,3401) CS RETIRED_ModifyingDeviceID 1 DICOM/retired -(0020,3402) CS RETIRED_ModifiedImageID 1 DICOM/retired -(0020,3403) DA RETIRED_ModifiedImageDate 1 DICOM/retired -(0020,3404) LO RETIRED_ModifyingDeviceManufacturer 1 DICOM/retired -(0020,3405) TM RETIRED_ModifiedImageTime 1 DICOM/retired -(0020,3406) LO RETIRED_ModifiedImageDescription 1 DICOM/retired -(0020,5000) AT RETIRED_OriginalImageIdentification 1-n DICOM/retired -(0020,5002) LO RETIRED_OriginalImageIdentificationNomenclature 1-n DICOM/retired -(0022,1094) LO RETIRED_LensConstantDescription 1 DICOM/retired -(0022,1153) SQ RETIRED_OphthalmicAxialLengthAcquisitionMethodCodeSequence 1 DICOM/retired -(0022,1265) SQ RETIRED_OphthalmicAxialLengthQualityMetricTypeCodeSequence 1 DICOM/retired -(0022,1273) LO RETIRED_OphthalmicAxialLengthQualityMetricTypeDescription 1 DICOM/retired -(0028,0005) US RETIRED_ImageDimensions 1 DICOM/retired -(0028,0012) US RETIRED_Planes 1 DICOM/retired -(0028,0040) CS RETIRED_ImageFormat 1 DICOM/retired -(0028,0050) LO RETIRED_ManipulatedImage 1-n DICOM/retired -(0028,005F) LO RETIRED_CompressionRecognitionCode 1 DICOM/retired -(0028,0060) CS RETIRED_CompressionCode 1 DICOM/retired -(0028,0061) SH RETIRED_CompressionOriginator 1 DICOM/retired -(0028,0062) LO RETIRED_CompressionLabel 1 DICOM/retired -(0028,0063) SH RETIRED_CompressionDescription 1 DICOM/retired -(0028,0065) CS RETIRED_CompressionSequence 1-n DICOM/retired -(0028,0066) AT RETIRED_CompressionStepPointers 1-n DICOM/retired -(0028,0068) US RETIRED_RepeatInterval 1 DICOM/retired -(0028,0069) US RETIRED_BitsGrouped 1 DICOM/retired -(0028,0070) US RETIRED_PerimeterTable 1-n DICOM/retired -(0028,0071) xs RETIRED_PerimeterValue 1 DICOM/retired -(0028,0080) US RETIRED_PredictorRows 1 DICOM/retired -(0028,0081) US RETIRED_PredictorColumns 1 DICOM/retired -(0028,0082) US RETIRED_PredictorConstants 1-n DICOM/retired -(0028,0090) CS RETIRED_BlockedPixels 1 DICOM/retired -(0028,0091) US RETIRED_BlockRows 1 DICOM/retired -(0028,0092) US RETIRED_BlockColumns 1 DICOM/retired -(0028,0093) US RETIRED_RowOverlap 1 DICOM/retired -(0028,0094) US RETIRED_ColumnOverlap 1 DICOM/retired -(0028,0104) xs RETIRED_SmallestValidPixelValue 1 DICOM/retired -(0028,0105) xs RETIRED_LargestValidPixelValue 1 DICOM/retired -(0028,0110) xs RETIRED_SmallestImagePixelValueInPlane 1 DICOM/retired -(0028,0111) xs RETIRED_LargestImagePixelValueInPlane 1 DICOM/retired -(0028,0200) US RETIRED_ImageLocation 1 DICOM/retired -(0028,0400) LO RETIRED_TransformLabel 1 DICOM/retired -(0028,0401) LO RETIRED_TransformVersionNumber 1 DICOM/retired -(0028,0402) US RETIRED_NumberOfTransformSteps 1 DICOM/retired -(0028,0403) LO RETIRED_SequenceOfCompressedData 1-n DICOM/retired -(0028,0404) AT RETIRED_DetailsOfCoefficients 1-n DICOM/retired # according to the DICOM standard, the following 4 attributes # should have a tag in the range of (0028,04x1) to (0028,04x3) (0028,0410) US RETIRED_RowsForNthOrderCoefficients 1 DICOM/retired (0028,0411) US RETIRED_ColumnsForNthOrderCoefficients 1 DICOM/retired (0028,0412) LO RETIRED_CoefficientCoding 1-n DICOM/retired (0028,0413) AT RETIRED_CoefficientCodingPointers 1-n DICOM/retired -(0028,0700) LO RETIRED_DCTLabel 1 DICOM/retired -(0028,0701) CS RETIRED_DataBlockDescription 1-n DICOM/retired -(0028,0702) AT RETIRED_DataBlock 1-n DICOM/retired -(0028,0710) US RETIRED_NormalizationFactorFormat 1 DICOM/retired -(0028,0720) US RETIRED_ZonalMapNumberFormat 1 DICOM/retired -(0028,0721) AT RETIRED_ZonalMapLocation 1-n DICOM/retired -(0028,0722) US RETIRED_ZonalMapFormat 1 DICOM/retired -(0028,0730) US RETIRED_AdaptiveMapFormat 1 DICOM/retired -(0028,0740) US RETIRED_CodeNumberFormat 1 DICOM/retired +# # according to the DICOM standard, the following 5 attributes # should have a tag in the range of (0028,08x0) to (0028,08x8) (0028,0800) CS RETIRED_CodeLabel 1-n DICOM/retired @@ -4545,156 +4410,11 @@ (0028,0803) AT RETIRED_CodeTableLocation 1-n DICOM/retired (0028,0804) US RETIRED_BitsForCodeWord 1 DICOM/retired (0028,0808) AT RETIRED_ImageDataLocation 1-n DICOM/retired -(0028,1080) CS RETIRED_GrayScale 1 DICOM/retired -(0028,1100) xs RETIRED_GrayLookupTableDescriptor 3 DICOM/retired -(0028,1111) xs RETIRED_LargeRedPaletteColorLookupTableDescriptor 4 DICOM/retired -(0028,1112) xs RETIRED_LargeGreenPaletteColorLookupTableDescriptor 4 DICOM/retired -(0028,1113) xs RETIRED_LargeBluePaletteColorLookupTableDescriptor 4 DICOM/retired -(0028,1200) lt RETIRED_GrayLookupTableData 1-n DICOM/retired -(0028,1211) OW RETIRED_LargeRedPaletteColorLookupTableData 1 DICOM/retired -(0028,1212) OW RETIRED_LargeGreenPaletteColorLookupTableData 1 DICOM/retired -(0028,1213) OW RETIRED_LargeBluePaletteColorLookupTableData 1 DICOM/retired -(0028,1214) UI RETIRED_LargePaletteColorLookupTableUID 1 DICOM/retired -(0028,4000) LT RETIRED_ImagePresentationComments 1 DICOM/retired -(0028,5000) SQ RETIRED_BiPlaneAcquisitionSequence 1 DICOM/retired -(0028,6030) US RETIRED_MaskPointers 1-n DICOM/retired -(0028,9099) US RETIRED_LargestMonochromePixelValue 1 DICOM/retired -(0032,000A) CS RETIRED_StudyStatusID 1 DICOM/retired -(0032,000C) CS RETIRED_StudyPriorityID 1 DICOM/retired -(0032,0012) LO RETIRED_StudyIDIssuer 1 DICOM/retired -(0032,0032) DA RETIRED_StudyVerifiedDate 1 DICOM/retired -(0032,0033) TM RETIRED_StudyVerifiedTime 1 DICOM/retired -(0032,0034) DA RETIRED_StudyReadDate 1 DICOM/retired -(0032,0035) TM RETIRED_StudyReadTime 1 DICOM/retired -(0032,1000) DA RETIRED_ScheduledStudyStartDate 1 DICOM/retired -(0032,1001) TM RETIRED_ScheduledStudyStartTime 1 DICOM/retired -(0032,1010) DA RETIRED_ScheduledStudyStopDate 1 DICOM/retired -(0032,1011) TM RETIRED_ScheduledStudyStopTime 1 DICOM/retired -(0032,1020) LO RETIRED_ScheduledStudyLocation 1 DICOM/retired -(0032,1021) AE RETIRED_ScheduledStudyLocationAETitle 1-n DICOM/retired -(0032,1030) LO RETIRED_ReasonForStudy 1 DICOM/retired -(0032,1040) DA RETIRED_StudyArrivalDate 1 DICOM/retired -(0032,1041) TM RETIRED_StudyArrivalTime 1 DICOM/retired -(0032,1050) DA RETIRED_StudyCompletionDate 1 DICOM/retired -(0032,1051) TM RETIRED_StudyCompletionTime 1 DICOM/retired -(0032,1055) CS RETIRED_StudyComponentStatusID 1 DICOM/retired -(0032,4000) LT RETIRED_StudyComments 1 DICOM/retired -(0038,0011) LO RETIRED_IssuerOfAdmissionID 1 DICOM/retired -(0038,001A) DA RETIRED_ScheduledAdmissionDate 1 DICOM/retired -(0038,001B) TM RETIRED_ScheduledAdmissionTime 1 DICOM/retired -(0038,001C) DA RETIRED_ScheduledDischargeDate 1 DICOM/retired -(0038,001D) TM RETIRED_ScheduledDischargeTime 1 DICOM/retired -(0038,001E) LO RETIRED_ScheduledPatientInstitutionResidence 1 DICOM/retired -(0038,0030) DA RETIRED_DischargeDate 1 DICOM/retired -(0038,0032) TM RETIRED_DischargeTime 1 DICOM/retired -(0038,0040) LO RETIRED_DischargeDiagnosisDescription 1 DICOM/retired -(0038,0044) SQ RETIRED_DischargeDiagnosisCodeSequence 1 DICOM/retired -(0038,0061) LO RETIRED_IssuerOfServiceEpisodeID 1 DICOM/retired -(0040,0307) DS RETIRED_DistanceSourceToSupport 1 DICOM/retired -(0040,0330) SQ RETIRED_ReferencedProcedureStepSequence 1 DICOM/retired -(0040,050A) LO RETIRED_SpecimenAccessionNumber 1 DICOM/retired -(0040,0550) SQ RETIRED_SpecimenSequence 1 DICOM/retired -(0040,0552) SQ RETIRED_SpecimenDescriptionSequenceTrial 1 DICOM/retired -(0040,0553) ST RETIRED_SpecimenDescriptionTrial 1 DICOM/retired -(0040,06FA) LO RETIRED_SlideIdentifier 1 DICOM/retired -(0040,08D8) SQ RETIRED_PixelSpacingSequence 1 DICOM/retired -(0040,08DA) SQ RETIRED_CoordinateSystemAxisCodeSequence 1 DICOM/retired -(0040,09F8) SQ RETIRED_VitalStainCodeSequenceTrial 1 DICOM/retired -(0040,1006) SH RETIRED_PlacerOrderNumberProcedure 1 DICOM/retired -(0040,1007) SH RETIRED_FillerOrderNumberProcedure 1 DICOM/retired -(0040,1060) LO RETIRED_RequestedProcedureDescriptionTrial 1 DICOM/retired -(0040,2001) LO RETIRED_ReasonForTheImagingServiceRequest 1 DICOM/retired -(0040,2006) SH RETIRED_PlacerOrderNumberImagingServiceRequestRetired 1 DICOM/retired -(0040,2007) SH RETIRED_FillerOrderNumberImagingServiceRequestRetired 1 DICOM/retired -(0040,4001) CS RETIRED_GeneralPurposeScheduledProcedureStepStatus 1 DICOM/retired -(0040,4002) CS RETIRED_GeneralPurposePerformedProcedureStepStatus 1 DICOM/retired -(0040,4003) CS RETIRED_GeneralPurposeScheduledProcedureStepPriority 1 DICOM/retired -(0040,4004) SQ RETIRED_ScheduledProcessingApplicationsCodeSequence 1 DICOM/retired -(0040,4006) CS RETIRED_MultipleCopiesFlag 1 DICOM/retired -(0040,4015) SQ RETIRED_ResultingGeneralPurposePerformedProcedureStepsSequence 1 DICOM/retired -(0040,4016) SQ RETIRED_ReferencedGeneralPurposeScheduledProcedureStepSequence 1 DICOM/retired -(0040,4022) SQ RETIRED_RelevantInformationSequence 1 DICOM/retired -(0040,4023) UI RETIRED_ReferencedGeneralPurposeScheduledProcedureStepTransactionUID 1 DICOM/retired -(0040,4031) SQ RETIRED_RequestedSubsequentWorkitemCodeSequence 1 DICOM/retired -(0040,4032) SQ RETIRED_NonDICOMOutputCodeSequence 1 DICOM/retired -(0040,A007) CS RETIRED_FindingsFlagTrial 1 DICOM/retired -(0040,A020) SQ RETIRED_FindingsSequenceTrial 1 DICOM/retired -(0040,A021) UI RETIRED_FindingsGroupUIDTrial 1 DICOM/retired -(0040,A022) UI RETIRED_ReferencedFindingsGroupUIDTrial 1 DICOM/retired -(0040,A023) DA RETIRED_FindingsGroupRecordingDateTrial 1 DICOM/retired -(0040,A024) TM RETIRED_FindingsGroupRecordingTimeTrial 1 DICOM/retired -(0040,A026) SQ RETIRED_FindingsSourceCategoryCodeSequenceTrial 1 DICOM/retired -(0040,A028) SQ RETIRED_DocumentingOrganizationIdentifierCodeSequenceTrial 1 DICOM/retired -(0040,A047) LO RETIRED_MeasurementPrecisionDescriptionTrial 1 DICOM/retired -(0040,A057) CS RETIRED_UrgencyOrPriorityAlertsTrial 1-n DICOM/retired -(0040,A060) LO RETIRED_SequencingIndicatorTrial 1 DICOM/retired -(0040,A066) SQ RETIRED_DocumentIdentifierCodeSequenceTrial 1 DICOM/retired -(0040,A067) PN RETIRED_DocumentAuthorTrial 1 DICOM/retired -(0040,A068) SQ RETIRED_DocumentAuthorIdentifierCodeSequenceTrial 1 DICOM/retired -(0040,A070) SQ RETIRED_IdentifierCodeSequenceTrial 1 DICOM/retired -(0040,A074) OB RETIRED_ObjectBinaryIdentifierTrial 1 DICOM/retired -(0040,A076) SQ RETIRED_DocumentingObserverIdentifierCodeSequenceTrial 1 DICOM/retired -(0040,A085) SQ RETIRED_ProcedureIdentifierCodeSequenceTrial 1 DICOM/retired -(0040,A089) OB RETIRED_ObjectDirectoryBinaryIdentifierTrial 1 DICOM/retired -(0040,A090) SQ RETIRED_EquivalentCDADocumentSequence 1 DICOM/retired -(0040,A110) DA RETIRED_DateOfDocumentOrVerbalTransactionTrial 1 DICOM/retired -(0040,A112) TM RETIRED_TimeOfDocumentCreationOrVerbalTransactionTrial 1 DICOM/retired -(0040,A125) CS RETIRED_ReportStatusIDTrial 2 DICOM/retired -(0040,A167) SQ RETIRED_ObservationCategoryCodeSequenceTrial 1 DICOM/retired -(0040,A16A) ST RETIRED_BibliographicCitationTrial 1 DICOM/retired +# # the following attribute is defined as SQ in the DICOM standard, # it was defined as CS in Supplement 23 (frozen draft) from 1997. #(0040,A170) CS RETIRED_ObservationClassTrial 1 DICOM/retired -(0040,A172) UI RETIRED_ReferencedObservationUIDTrial 1 DICOM/retired -(0040,A173) CS RETIRED_ReferencedObservationClassTrial 1 DICOM/retired -(0040,A174) CS RETIRED_ReferencedObjectObservationClassTrial 1 DICOM/retired -(0040,A192) DA RETIRED_ObservationDateTrial 1 DICOM/retired -(0040,A193) TM RETIRED_ObservationTimeTrial 1 DICOM/retired -(0040,A194) CS RETIRED_MeasurementAutomationTrial 1 DICOM/retired -(0040,A224) ST RETIRED_IdentificationDescriptionTrial 1 DICOM/retired -(0040,A290) CS RETIRED_CoordinatesSetGeometricTypeTrial 1 DICOM/retired -(0040,A296) SQ RETIRED_AlgorithmCodeSequenceTrial 1 DICOM/retired -(0040,A297) ST RETIRED_AlgorithmDescriptionTrial 1 DICOM/retired -(0040,A29A) SL RETIRED_PixelCoordinatesSetTrial 2-2n DICOM/retired -(0040,A307) PN RETIRED_CurrentObserverTrial 1 DICOM/retired -(0040,A313) SQ RETIRED_ReferencedAccessionSequenceTrial 1 DICOM/retired -(0040,A33A) ST RETIRED_ReportStatusCommentTrial 1 DICOM/retired -(0040,A340) SQ RETIRED_ProcedureContextSequenceTrial 1 DICOM/retired -(0040,A352) PN RETIRED_VerbalSourceTrial 1 DICOM/retired -(0040,A353) ST RETIRED_AddressTrial 1 DICOM/retired -(0040,A354) LO RETIRED_TelephoneNumberTrial 1 DICOM/retired -(0040,A358) SQ RETIRED_VerbalSourceIdentifierCodeSequenceTrial 1 DICOM/retired -(0040,A380) SQ RETIRED_ReportDetailSequenceTrial 1 DICOM/retired -(0040,A402) UI RETIRED_ObservationSubjectUIDTrial 1 DICOM/retired -(0040,A403) CS RETIRED_ObservationSubjectClassTrial 1 DICOM/retired -(0040,A404) SQ RETIRED_ObservationSubjectTypeCodeSequenceTrial 1 DICOM/retired -(0040,A600) CS RETIRED_ObservationSubjectContextFlagTrial 1 DICOM/retired -(0040,A601) CS RETIRED_ObserverContextFlagTrial 1 DICOM/retired -(0040,A603) CS RETIRED_ProcedureContextFlagTrial 1 DICOM/retired -(0040,A731) SQ RETIRED_RelationshipSequenceTrial 1 DICOM/retired -(0040,A732) SQ RETIRED_RelationshipTypeCodeSequenceTrial 1 DICOM/retired -(0040,A744) SQ RETIRED_LanguageCodeSequenceTrial 1 DICOM/retired -(0040,A992) ST RETIRED_UniformResourceLocatorTrial 1 DICOM/retired -(0040,DB06) DT RETIRED_TemplateVersion 1 DICOM/retired -(0040,DB07) DT RETIRED_TemplateLocalVersion 1 DICOM/retired -(0040,DB0B) CS RETIRED_TemplateExtensionFlag 1 DICOM/retired -(0040,DB0C) UI RETIRED_TemplateExtensionOrganizationUID 1 DICOM/retired -(0040,DB0D) UI RETIRED_TemplateExtensionCreatorUID 1 DICOM/retired -(0054,1400) CS RETIRED_CountsIncluded 1-n DICOM/retired -(0054,1401) CS RETIRED_DeadTimeCorrectionFlag 1 DICOM/retired -(0070,0040) IS RETIRED_ImageRotationRetired 1 DICOM/retired -(0070,0050) US RETIRED_DisplayedAreaTopLeftHandCornerTrial 2 DICOM/retired -(0070,0051) US RETIRED_DisplayedAreaBottomRightHandCornerTrial 2 DICOM/retired -(0070,0067) US RETIRED_GraphicLayerRecommendedDisplayRGBValue 3 DICOM/retired -(0074,1024) IS RETIRED_BeamOrderIndexTrial 1 DICOM/retired -(0074,1038) DS RETIRED_DoubleExposureMetersetTrial 1 DICOM/retired -(0074,103A) DS RETIRED_DoubleExposureFieldDeltaTrial 4 DICOM/retired -(0074,1220) SQ RETIRED_RelatedProcedureStepSequence 1 DICOM/retired -(0074,1222) LO RETIRED_ProcedureStepRelationshipType 1 DICOM/retired -(0088,0904) LO RETIRED_TopicTitle 1 DICOM/retired -(0088,0906) ST RETIRED_TopicSubject 1 DICOM/retired -(0088,0910) LO RETIRED_TopicAuthor 1 DICOM/retired -(0088,0912) LO RETIRED_TopicKeywords 1-32 DICOM/retired +# # according to the DICOM standard, the following 6 attributes # should have a tag in the range of (1000,xxx0) to (1000,xxx5) (1000,0010) US RETIRED_EscapeTriplet 3 DICOM/retired @@ -4703,140 +4423,10 @@ (1000,0013) US RETIRED_HuffmanTableTriplet 3 DICOM/retired (1000,0014) US RETIRED_ShiftTableSize 1 DICOM/retired (1000,0015) US RETIRED_ShiftTableTriplet 3 DICOM/retired +# # according to the DICOM standard, the following attribute # should have the tag (1010,xxxx) where "x" is "0" to "F" (1010,0004) US RETIRED_ZonalMap 1-n DICOM/retired -(2000,0062) CS RETIRED_ColorImagePrintingFlag 1 DICOM/retired -(2000,0063) CS RETIRED_CollationFlag 1 DICOM/retired -(2000,0065) CS RETIRED_AnnotationFlag 1 DICOM/retired -(2000,0067) CS RETIRED_ImageOverlayFlag 1 DICOM/retired -(2000,0069) CS RETIRED_PresentationLUTFlag 1 DICOM/retired -(2000,006A) CS RETIRED_ImageBoxPresentationLUTFlag 1 DICOM/retired -(2000,0510) SQ RETIRED_ReferencedStoredPrintSequence 1 DICOM/retired -(2020,0130) SQ RETIRED_ReferencedImageOverlayBoxSequence 1 DICOM/retired -(2020,0140) SQ RETIRED_ReferencedVOILUTBoxSequence 1 DICOM/retired -(2040,0010) SQ RETIRED_ReferencedOverlayPlaneSequence 1 DICOM/retired -(2040,0011) US RETIRED_ReferencedOverlayPlaneGroups 1-99 DICOM/retired -(2040,0020) SQ RETIRED_OverlayPixelDataSequence 1 DICOM/retired -(2040,0060) CS RETIRED_OverlayMagnificationType 1 DICOM/retired -(2040,0070) CS RETIRED_OverlaySmoothingType 1 DICOM/retired -(2040,0072) CS RETIRED_OverlayOrImageMagnification 1 DICOM/retired -(2040,0074) US RETIRED_MagnifyToNumberOfColumns 1 DICOM/retired -(2040,0080) CS RETIRED_OverlayForegroundDensity 1 DICOM/retired -(2040,0082) CS RETIRED_OverlayBackgroundDensity 1 DICOM/retired -(2040,0090) CS RETIRED_OverlayMode 1 DICOM/retired -(2040,0100) CS RETIRED_ThresholdDensity 1 DICOM/retired -(2040,0500) SQ RETIRED_ReferencedImageBoxSequenceRetired 1 DICOM/retired -(2100,0010) SH RETIRED_PrintJobID 1 DICOM/retired -(2100,0140) AE RETIRED_DestinationAE 1 DICOM/retired -(2100,0500) SQ RETIRED_ReferencedPrintJobSequencePullStoredPrint 1 DICOM/retired -(2110,0099) SH RETIRED_PrintQueueID 1 DICOM/retired -(2120,0010) CS RETIRED_QueueStatus 1 DICOM/retired -(2120,0050) SQ RETIRED_PrintJobDescriptionSequence 1 DICOM/retired -(2120,0070) SQ RETIRED_ReferencedPrintJobSequence 1 DICOM/retired -(2130,0010) SQ RETIRED_PrintManagementCapabilitiesSequence 1 DICOM/retired -(2130,0015) SQ RETIRED_PrinterCharacteristicsSequence 1 DICOM/retired -(2130,0030) SQ RETIRED_FilmBoxContentSequence 1 DICOM/retired -(2130,0040) SQ RETIRED_ImageBoxContentSequence 1 DICOM/retired -(2130,0050) SQ RETIRED_AnnotationContentSequence 1 DICOM/retired -(2130,0060) SQ RETIRED_ImageOverlayBoxContentSequence 1 DICOM/retired -(2130,0080) SQ RETIRED_PresentationLUTContentSequence 1 DICOM/retired -(2130,00A0) SQ RETIRED_ProposedStudySequence 1 DICOM/retired -(2130,00C0) SQ RETIRED_OriginalImageSequence 1 DICOM/retired -(3006,00C0) SQ RETIRED_FrameOfReferenceRelationshipSequence 1 DICOM/retired -(3006,00C2) UI RETIRED_RelatedFrameOfReferenceUID 1 DICOM/retired -(3006,00C4) CS RETIRED_FrameOfReferenceTransformationType 1 DICOM/retired -(300A,0088) FL RETIRED_BeamDosePointDepth 1 DICOM/retired -(300A,0089) FL RETIRED_BeamDosePointEquivalentDepth 1 DICOM/retired -(300A,008A) FL RETIRED_BeamDosePointSSD 1 DICOM/retired -(4000,0010) LT RETIRED_Arbitrary 1 DICOM/retired -(4000,4000) LT RETIRED_TextComments 1 DICOM/retired -(4008,0040) SH RETIRED_ResultsID 1 DICOM/retired -(4008,0042) LO RETIRED_ResultsIDIssuer 1 DICOM/retired -(4008,0050) SQ RETIRED_ReferencedInterpretationSequence 1 DICOM/retired -(4008,00FF) CS RETIRED_ReportProductionStatusTrial 1 DICOM/retired -(4008,0100) DA RETIRED_InterpretationRecordedDate 1 DICOM/retired -(4008,0101) TM RETIRED_InterpretationRecordedTime 1 DICOM/retired -(4008,0102) PN RETIRED_InterpretationRecorder 1 DICOM/retired -(4008,0103) LO RETIRED_ReferenceToRecordedSound 1 DICOM/retired -(4008,0108) DA RETIRED_InterpretationTranscriptionDate 1 DICOM/retired -(4008,0109) TM RETIRED_InterpretationTranscriptionTime 1 DICOM/retired -(4008,010A) PN RETIRED_InterpretationTranscriber 1 DICOM/retired -(4008,010B) ST RETIRED_InterpretationText 1 DICOM/retired -(4008,010C) PN RETIRED_InterpretationAuthor 1 DICOM/retired -(4008,0111) SQ RETIRED_InterpretationApproverSequence 1 DICOM/retired -(4008,0112) DA RETIRED_InterpretationApprovalDate 1 DICOM/retired -(4008,0113) TM RETIRED_InterpretationApprovalTime 1 DICOM/retired -(4008,0114) PN RETIRED_PhysicianApprovingInterpretation 1 DICOM/retired -(4008,0115) LT RETIRED_InterpretationDiagnosisDescription 1 DICOM/retired -(4008,0117) SQ RETIRED_InterpretationDiagnosisCodeSequence 1 DICOM/retired -(4008,0118) SQ RETIRED_ResultsDistributionListSequence 1 DICOM/retired -(4008,0119) PN RETIRED_DistributionName 1 DICOM/retired -(4008,011A) LO RETIRED_DistributionAddress 1 DICOM/retired -(4008,0200) SH RETIRED_InterpretationID 1 DICOM/retired -(4008,0202) LO RETIRED_InterpretationIDIssuer 1 DICOM/retired -(4008,0210) CS RETIRED_InterpretationTypeID 1 DICOM/retired -(4008,0212) CS RETIRED_InterpretationStatusID 1 DICOM/retired -(4008,0300) ST RETIRED_Impressions 1 DICOM/retired -(4008,4000) ST RETIRED_ResultsComments 1 DICOM/retired -(5000-50FF,0005) US RETIRED_CurveDimensions 1 DICOM/retired -(5000-50FF,0010) US RETIRED_NumberOfPoints 1 DICOM/retired -(5000-50FF,0020) CS RETIRED_TypeOfData 1 DICOM/retired -(5000-50FF,0022) LO RETIRED_CurveDescription 1 DICOM/retired -(5000-50FF,0030) SH RETIRED_AxisUnits 1-n DICOM/retired -(5000-50FF,0040) SH RETIRED_AxisLabels 1-n DICOM/retired -(5000-50FF,0103) US RETIRED_DataValueRepresentation 1 DICOM/retired -(5000-50FF,0104) US RETIRED_MinimumCoordinateValue 1-n DICOM/retired -(5000-50FF,0105) US RETIRED_MaximumCoordinateValue 1-n DICOM/retired -(5000-50FF,0106) SH RETIRED_CurveRange 1-n DICOM/retired -(5000-50FF,0110) US RETIRED_CurveDataDescriptor 1-n DICOM/retired -(5000-50FF,0112) US RETIRED_CoordinateStartValue 1-n DICOM/retired -(5000-50FF,0114) US RETIRED_CoordinateStepValue 1-n DICOM/retired -(5000-50FF,1001) CS RETIRED_CurveActivationLayer 1 DICOM/retired -(5000-50FF,2000) US RETIRED_AudioType 1 DICOM/retired -(5000-50FF,2002) US RETIRED_AudioSampleFormat 1 DICOM/retired -(5000-50FF,2004) US RETIRED_NumberOfChannels 1 DICOM/retired -(5000-50FF,2006) UL RETIRED_NumberOfSamples 1 DICOM/retired -(5000-50FF,2008) UL RETIRED_SampleRate 1 DICOM/retired -(5000-50FF,200A) UL RETIRED_TotalTime 1 DICOM/retired -(5000-50FF,200C) ox RETIRED_AudioSampleData 1 DICOM/retired -(5000-50FF,200E) LT RETIRED_AudioComments 1 DICOM/retired -(5000-50FF,2500) LO RETIRED_CurveLabel 1 DICOM/retired -(5000-50FF,2600) SQ RETIRED_CurveReferencedOverlaySequence 1 DICOM/retired -(5000-50FF,2610) US RETIRED_CurveReferencedOverlayGroup 1 DICOM/retired -(5000-50FF,3000) ox RETIRED_CurveData 1 DICOM/retired -(6000-60FF,0012) US RETIRED_OverlayPlanes 1 DICOM/retired -(6000-60FF,0052) US RETIRED_OverlayPlaneOrigin 1 DICOM/retired -(6000-60FF,0060) CS RETIRED_OverlayCompressionCode 1 DICOM/retired -(6000-60FF,0061) SH RETIRED_OverlayCompressionOriginator 1 DICOM/retired -(6000-60FF,0062) SH RETIRED_OverlayCompressionLabel 1 DICOM/retired -(6000-60FF,0063) CS RETIRED_OverlayCompressionDescription 1 DICOM/retired -(6000-60FF,0066) AT RETIRED_OverlayCompressionStepPointers 1-n DICOM/retired -(6000-60FF,0068) US RETIRED_OverlayRepeatInterval 1 DICOM/retired -(6000-60FF,0069) US RETIRED_OverlayBitsGrouped 1 DICOM/retired -(6000-60FF,0110) CS RETIRED_OverlayFormat 1 DICOM/retired -(6000-60FF,0200) US RETIRED_OverlayLocation 1 DICOM/retired -(6000-60FF,0800) CS RETIRED_OverlayCodeLabel 1-n DICOM/retired -(6000-60FF,0802) US RETIRED_OverlayNumberOfTables 1 DICOM/retired -(6000-60FF,0803) AT RETIRED_OverlayCodeTableLocation 1-n DICOM/retired -(6000-60FF,0804) US RETIRED_OverlayBitsForCodeWord 1 DICOM/retired -(6000-60FF,1100) US RETIRED_OverlayDescriptorGray 1 DICOM/retired -(6000-60FF,1101) US RETIRED_OverlayDescriptorRed 1 DICOM/retired -(6000-60FF,1102) US RETIRED_OverlayDescriptorGreen 1 DICOM/retired -(6000-60FF,1103) US RETIRED_OverlayDescriptorBlue 1 DICOM/retired -(6000-60FF,1200) US RETIRED_OverlaysGray 1-n DICOM/retired -(6000-60FF,1201) US RETIRED_OverlaysRed 1-n DICOM/retired -(6000-60FF,1202) US RETIRED_OverlaysGreen 1-n DICOM/retired -(6000-60FF,1203) US RETIRED_OverlaysBlue 1-n DICOM/retired -(6000-60FF,4000) LT RETIRED_OverlayComments 1 DICOM/retired -(7FE0,0020) OW RETIRED_CoefficientsSDVN 1 DICOM/retired -(7FE0,0030) OW RETIRED_CoefficientsSDHN 1 DICOM/retired -(7FE0,0040) OW RETIRED_CoefficientsSDDN 1 DICOM/retired -(7F00-7FFF,0010) ox RETIRED_VariablePixelData 1 DICOM/retired -(7F00-7FFF,0011) US RETIRED_VariableNextDataGroup 1 DICOM/retired -(7F00-7FFF,0020) OW RETIRED_VariableCoefficientsSDVN 1 DICOM/retired -(7F00-7FFF,0030) OW RETIRED_VariableCoefficientsSDHN 1 DICOM/retired -(7F00-7FFF,0040) OW RETIRED_VariableCoefficientsSDDN 1 DICOM/retired # # end of dicom.dic # diff --git a/dcmdata/docs/CMakeLists.txt b/dcmdata/docs/CMakeLists.txt index b01d7557..fe35ccc0 100644 --- a/dcmdata/docs/CMakeLists.txt +++ b/dcmdata/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES datadict.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) +INSTALL(FILES datadict.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git a/dcmdata/docs/datadict.txt b/dcmdata/docs/datadict.txt index 9a139805..98bf94f7 100644 --- a/dcmdata/docs/datadict.txt +++ b/dcmdata/docs/datadict.txt @@ -8,8 +8,8 @@ information must also be made available in DCMTK. This is accomplished through a global data dictionary class. The global data dictionary is loaded within a C++ constructor into the global -DcmDataDictionary class instance called dcmDataDict once it is accessed for the -first time from the code. The dictionary content is populated by three +DcmDataDictionary class instance called dcmDataDict once it is accessed for +the first time from the code. The dictionary content is populated by three different approaches: Either the content (tags, VR, ...) can be compiled into the dictionary code, or the dictionary is filled by loading a text file on startup from a pre-defined file path (also called an "external" data @@ -17,15 +17,15 @@ dictionary). Lastly, DCMTK will load one or more additional external dictionaries from the path set in the environment variable DCMDICTPATH, if set. The built-in approach offers the advantage that a binary will not have to -load any information from a separate file which may get lost or or used in an +load any information from a separate file, which may get lost or used in an outdated version. Loading the dictionary content from a separate file, however, has the advantage that application programs need not be recompiled if additions or corrections are made to the data dictionary. -DCMTK uses an external data dictionary per default on Posix systems (Linux, -Mac OS X, etc.) while a built-in dictionary is used on Windows systems. How -these defaults can be changed or how both approaches can even be combined -is further explained below. +DCMTK uses an external data dictionary by default on Posix systems (Linux, +Mac OS X, etc.) while a built-in dictionary is used on Windows systems. How +these defaults can be changed or how both approaches can even be combined is +further explained below. ----------------------------------------------------------------------------- DICTIONARY DEFAULT: AUTOCONF ON POSIX SYSTEMS @@ -33,36 +33,38 @@ DICTIONARY DEFAULT: AUTOCONF ON POSIX SYSTEMS By default on a Posix system the global data dictionary will attempt to load the data dictionary from an external file. The location is pre-configured -to $DCMTK_DAT_DIR/dicom.dic where $DCMTK_DAT_DIR is DCMTK's data -installation prefix chosen using configure's --datadir option (default: -/dcmtk). See also --datarootdir and --prefix options. The resulting path is -stored as DCM_DICT_DEFAULT_PATH in the file -config/include/dcmtk/config/osconfig.h, which is created by autoconf -during the execution of the configure script and thus is available to the -dictionary code that includes osconfig.h. +to $DCMTK_DAT_DIR/dicom.dic where $DCMTK_DAT_DIR is DCMTK's data installation +directory chosen using configure's --datadir option (default value: /dcmtk). +See also --datarootdir and --prefix options. The resulting path is stored as +DCM_DICT_DEFAULT_PATH in the file config/include/dcmtk/config/osconfig.h, +which is created by Autoconf during the execution of the configure script and +thus is available to the dictionary code that includes osconfig.h. ----------------------------------------------------------------------------- DICTIONARY DEFAULT: CMAKE ON WINDOWS AND POSIX SYSTEMS ----------------------------------------------------------------------------- -On Windows (and Posix if using CMake on this platform), the default behaviour -is to compile a fully-populated DICOM dictionary as global data dictionary -into the dcmdata library. Thus, it is not required to load an external data -dictionary from a file and dcmdata will not try loading such a file by default. +On Windows, the default behavior is to compile a fully-populated DICOM +dictionary as global data dictionary into the dcmdata library. Thus, it is +not required to load an external data dictionary from a file and dcmdata will +not try loading such a file by default. + +On Posix systems, the default setting is to load the data dictionary from an +external file (as described in the above section on Autoconf). ----------------------------------------------------------------------------- CHANGING DICTIONARY DEFAULTS ----------------------------------------------------------------------------- Autoconf as well as CMake provide options to change their default dictionary -behaviour. For autoconf, configure offers the options: +behavior. For Autoconf, configure offers the options: --enable-external-dict enable loading of external dictionary (default) --disable-external-dict don't load external dictionary --enable-builtin-dict enable loading of built-in dictionary (default) --disable-builtin-dict don't load built-in dictionary -They can be used toggle both dictionaries on and off: If the external +They can be used to toggle both dictionaries on and off: If the external dictionary is turned off, it is not tried to load it from any default location. @@ -79,25 +81,25 @@ The built-in dictionary, if enabled, is always loaded first on startup, followed by any external dictionary. Data dictionary entries loaded later in the load sequence override entries loaded earlier. -Note that most of the time (no matter whether using autoconf or CMake) it +Note that most of the time (no matter whether using Autoconf or CMake) it makes sense to enable only the built-in dictionary or only the external -dictionary. If both external and built-in version are enabled, the global data -dictionary is populated first with the compiled-in data, and afterwards the -external dictionary is loaded. If the latter is the default one shipping with +dictionary. If both external and built-in version are enabled, the global +data dictionary is populated first with the compiled-in data, and afterwards +the external dictionary is loaded. If the latter is the one shipped with DCMTK (dicom.dic) then the external dictionary provides no extra information -since it contains exactly the same data as the built-in one but only takes time -loading. Thus it only makes sense to use enable both options if the external -dictionary is modified to include (only) additional information not available in -the built-in dictionary. +since it contains exactly the same data as the built-in one but only takes +time for loading. Thus it only makes sense to enable both options if the +external dictionary is modified to include (only) additional information not +available in the built-in dictionary. -If the user disables both options, no dictionary will be loaded per default +If the user disables both options, no dictionary will be loaded by default on startup. However, a dictionary can be defined using the DCMDICTPATH -environment variable (see below). If DCMDICTPATH is used, the default external -dictionary will not be loaded at all. +environment variable (see below). If DCMDICTPATH is used, the default +external dictionary will not be loaded at all. Application programs should check that a data dictionary has been loaded before using the functionality of the dcmdata library. The absence of -a data dictionary is likely to cause unexpected behaviour (e.g. unknown +a data dictionary is likely to cause unexpected behavior (e.g. unknown attributes will be encoded using VR=UN). ----------------------------------------------------------------------------- @@ -105,16 +107,16 @@ CUSTOM EXTERNAL DICTIONARIES THROUGH ENVIRONMENT VARIABLE "DCMDICTPATH" ----------------------------------------------------------------------------- Sometimes it makes sense to change the dictionary that should be loaded -without recompiling the source code. This can be done either be modifying +without recompiling the source code. This can be done either by modifying the dicom.dic that is already loaded, or, by specifying a different location in an environment variable that is evaluated on DCMTK startup. That -enviornment variable is called "DCMDICTPATH" and is considered on Windows -and Posix platforms. If DCMDICTPATH is not set, the behaviour described in -the the sections above takes place (built-in and/or external dictionary from +environment variable is called "DCMDICTPATH" and is considered on Windows +and Posix platforms. If DCMDICTPATH is not set, the behavior described in +the sections above takes place (built-in and/or external dictionary from default path is loaded). Otherwise, the file provided in the environment variable DCMDICTPATH is loaded -and any default external dictionary is ignored(!). However, note that the +and any default external dictionary is ignored (!). However, note that the built-in dictionary (if configured) will be always loaded. In order to set DCMDICTPATH on Unix, the csh shell command @@ -135,15 +137,15 @@ dictionary dicom.dic from the main directory on drive C. USING MORE THAN ONE EXTERNAL DICTIONARY ----------------------------------------------------------------------------- -The DCMDICTPATH environment variable can even contain several data -dictionaries separated by colons (":") on Unix systems, and semicolon on -Windows systems. Thus the Unix csh command: +The DCMDICTPATH environment variable can even refer to several data +dictionaries separated by colons (":") on Unix systems, or semicolons (";") +on Windows systems. Thus the Unix csh command: setenv DCMDICTPATH /usr/local/share/dcmtk/dicom.dic:$HOME/dicom.dic would cause all applications using the dcmdata library to first load the default data dictionary and subsequently load the data dictionary dicom.dic -from the users home directory. On Windows systems, an example could be +from the user's home directory. On Windows systems, an example would be: set DCMDICTPATH=c:\dcmtk-install\share\dcmtk\dicom.dic;c:\dicom.dic @@ -154,38 +156,38 @@ entries loaded earlier. DATA DICTIONARIES INCLUDED IN DCMTK (DICOM.DIC, PRIVATE.DIC AND BUILT-IN) ----------------------------------------------------------------------------- -An example DICOM data dictionary can be found in dcmdata/data/dicom.dic -which is also installed (using autoconf or CMake) and used as the default +An example DICOM data dictionary can be found in dcmdata/data/dicom.dic, +which is also installed (using Autoconf or CMake) and used as the default external dictionary (if external default dictionary is enabled). -The example data dictionary is relatively complete and includes all -standard DICOM tags (see the header of the file, where the implemented -version of the standard plus all supplements and CPs are listed), obsolete -ACR/NEMA version 2 tags, obsolete SPI tags, and the tags used by Papyrus -version 3. An early version of this data dictionary was based on a data -dictionary put together by David Clunie. +The example data dictionary is is meant to be complete and includes all +standard and retired tags from part 6 of the DICOM standard (see the header of +the file where the implemented version of the standard plus all supplements +and CPs are listed). Also contained, since they are included in part 6, are +the official DICONDE (Digital Imaging and Communication in Nondestructive +Evaluation) and DICOS (Digital Imaging and Communications in Security) tags. -Another example dictionary included is the dcmdata/data/private.dic which -includes any private tag information known to DCMTK developers and partly -taken over from other DICOM toolkits and various other sources like +Another example dictionary included is the dcmdata/data/private.dic, which +includes all private tag information known to DCMTK developers and partly +taken over from other DICOM toolkits and various other sources like DICOM Conformance Statements. There is no guarantee that the tag information -contained is valid or even complete. Per default, this dictionary is not +contained is valid or even complete. By default, this dictionary is not taken into account. It can be enabled to load on startup as an extra -external dictionary using autoconf's configure option "--enable-private-tags" +external dictionary using Autoconf's configure option "--enable-private-tags" and in CMake using the option "DCMTK_ENABLE_PRIVATE_TAGS". Enabling will -result in private.dic being added to the DCM_DICT_DEFAULT_PATH which lists those -external dictionaries to be loaded on startup (see above). Note that the -private tag option is only considered for external dictionaries if external -dictionaries are not turned off. +result in private.dic being added to the DCM_DICT_DEFAULT_PATH, which lists +those external dictionaries to be loaded on startup (see above). Note that +the private tag option is only considered for external dictionaries if +external dictionaries are not turned off. DCMTK also includes two predefined built-in dictionaries, one fully populated containing the information from DCMTK's dicom.dic file, and one that is empty. Both are defined in dcdictbi.cc and the one to be used is selected by the -builtin dictionary build options (see above). +built-in dictionary build options (see above). The code for a useful built-in data dictionary can be regenerated at any time by the mkdictbi program (dcmdata/libsrc/mkdictbi). The dcmdata library -Makefiles (for autoconf dcmdata/libsrc/Makefile.in, and for CMake +Makefiles (for Autoconf dcmdata/libsrc/Makefile.in, and for CMake dcmdata/libsrc/CMakeLists.txt) include a target (updatebuiltindict) for this purpose. After regenerating dcdictbi.cc, rebuilding the libdcmdata.a library and relinking all your applications will ensure that the built-in data @@ -196,24 +198,25 @@ TAG NAME CONSTANTS FOR USE IN APPLICATIONS ----------------------------------------------------------------------------- The include file dcmdata/include/dcmtk/dcmdata/dcdeftag.h can be generated -from a data dictionary by the program mkdeftag. The include file defines -tag names for use in application programs. The names are generated from -the names specified in the data dictionary. Duplicate names in the data -dictionary will result in compiler warnings due to duplicate #define's -when compiling code which includes the dcdeftag.h header file. Thus, when -adding new entries to the data dictionary, care should be taken to ensure -that attribute names are not duplicated for distinct tags. -The dcmdata library Makefiles (for autoconf dcmdata/libsrc/Makefile.in and for -CMake dcmdata/libsrc/CMakeLists.txt) include a target (updatedeftag) which +from a data dictionary by the program mkdeftag. The include file defines tag +names for use in application programs. The names are generated from the names +specified in the data dictionary. Duplicate names in the data dictionary will +result in compiler warnings due to duplicate #define's when compiling code +that includes the dcdeftag.h header file. Thus, when adding new entries to +the data dictionary, care should be taken to ensure that attribute names are +not duplicated for distinct tags. + +The dcmdata library Makefiles (for Autoconf dcmdata/libsrc/Makefile.in and for +CMake dcmdata/libsrc/CMakeLists.txt) include a target (updatedeftag) that builds the mkdeftag tool and uses it to generate the dcmdata/include/dcmtk/dcmdata/dcdeftag.h header file. The header file should be regenerated whenever additions or name modifications are made to the data -dictionary. Care should be taken before modifying any tag names since existing -application programs may already use the old name and might subsequently fail -to compile. +dictionary. Care should be taken before modifying any tag names since +existing application programs may already use the old name and might +subsequently fail to compile. ------------ -OFFIS e.V., Oldenburg, Germany +DCMTK Development Team, Oldenburg, Germany -Last revised: 2015-09-16 (Onken). +Last revised: 2017-09-14 (Riesmeier). diff --git a/dcmdata/include/CMakeLists.txt b/dcmdata/include/CMakeLists.txt index 9537307a..da58ac0f 100644 --- a/dcmdata/include/CMakeLists.txt +++ b/dcmdata/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmdata DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmdata DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmdata/include/dcmtk/dcmdata/dcchrstr.h b/dcmdata/include/dcmtk/dcmdata/dcchrstr.h index 4abb828a..8b8535ad 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcchrstr.h +++ b/dcmdata/include/dcmtk/dcmdata/dcchrstr.h @@ -146,6 +146,10 @@ class DCMTK_DCMDATA_EXPORT DcmCharString const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; + /// @copydoc DcmElement::isUniversalMatch() + virtual OFBool isUniversalMatch(const OFBool normalize = OFTrue, + const OFBool enableWildCardMatching = OFTrue); + protected: /** get value of the SpecificCharacterSet element of the surrounding dataset/item diff --git a/dcmdata/include/dcmtk/dcmdata/dcdeftag.h b/dcmdata/include/dcmtk/dcmdata/dcdeftag.h index b1632596..188ec628 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcdeftag.h +++ b/dcmdata/include/dcmtk/dcmdata/dcdeftag.h @@ -4,7 +4,7 @@ ** ** User: joergr ** Host: thinkpad -** Date: 2017-06-15 10:51:06 +** Date: 2017-12-07 15:02:11 ** Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdeftag ** ** From: ../data/dicom.dic @@ -17,12 +17,12 @@ #include "dcmtk/dcmdata/dctagkey.h" -#define DCM_DICT_DEFTAG_BUILD_DATE "2017-06-15 10:51:06" +#define DCM_DICT_DEFTAG_BUILD_DATE "2017-12-07 15:02:11" /* ** Fixed Tags in ascending (gggg,eeee) order. -** Number of entries: 4229 +** Number of entries: 4254 ** Tags with a repeating component (repeating tags) are listed later. */ #define DCM_CommandGroupLength DcmTagKey(0x0000, 0x0000) @@ -142,6 +142,7 @@ #define DCM_Modality DcmTagKey(0x0008, 0x0060) #define DCM_ModalitiesInStudy DcmTagKey(0x0008, 0x0061) #define DCM_SOPClassesInStudy DcmTagKey(0x0008, 0x0062) +#define DCM_AnatomicRegionsInStudyCodeSequence DcmTagKey(0x0008, 0x0063) #define DCM_ConversionType DcmTagKey(0x0008, 0x0064) #define DCM_PresentationIntentType DcmTagKey(0x0008, 0x0068) #define DCM_Manufacturer DcmTagKey(0x0008, 0x0070) @@ -163,9 +164,12 @@ #define DCM_ContextGroupVersion DcmTagKey(0x0008, 0x0106) #define DCM_ContextGroupLocalVersion DcmTagKey(0x0008, 0x0107) #define DCM_ExtendedCodeMeaning DcmTagKey(0x0008, 0x0108) +#define DCM_CodingSchemeResourcesSequence DcmTagKey(0x0008, 0x0109) +#define DCM_CodingSchemeURLType DcmTagKey(0x0008, 0x010a) #define DCM_ContextGroupExtensionFlag DcmTagKey(0x0008, 0x010b) #define DCM_CodingSchemeUID DcmTagKey(0x0008, 0x010c) #define DCM_ContextGroupExtensionCreatorUID DcmTagKey(0x0008, 0x010d) +#define DCM_CodingSchemeURL DcmTagKey(0x0008, 0x010e) #define DCM_ContextIdentifier DcmTagKey(0x0008, 0x010f) #define DCM_CodingSchemeIdentificationSequence DcmTagKey(0x0008, 0x0110) #define DCM_CodingSchemeRegistry DcmTagKey(0x0008, 0x0112) @@ -274,7 +278,7 @@ #define DCM_AnatomicRegionSequence DcmTagKey(0x0008, 0x2218) #define DCM_AnatomicRegionModifierSequence DcmTagKey(0x0008, 0x2220) #define DCM_PrimaryAnatomicStructureSequence DcmTagKey(0x0008, 0x2228) -#define DCM_AnatomicStructureSpaceOrRegionSequence DcmTagKey(0x0008, 0x2229) +#define DCM_RETIRED_AnatomicStructureSpaceOrRegionSequence DcmTagKey(0x0008, 0x2229) #define DCM_PrimaryAnatomicStructureModifierSequence DcmTagKey(0x0008, 0x2230) #define DCM_RETIRED_TransducerPositionSequence DcmTagKey(0x0008, 0x2240) #define DCM_RETIRED_TransducerPositionModifierSequence DcmTagKey(0x0008, 0x2242) @@ -396,6 +400,8 @@ #define DCM_ClinicalTrialSubjectReadingID DcmTagKey(0x0012, 0x0042) #define DCM_ClinicalTrialTimePointID DcmTagKey(0x0012, 0x0050) #define DCM_ClinicalTrialTimePointDescription DcmTagKey(0x0012, 0x0051) +#define DCM_LongitudinalTemporalOffsetFromEvent DcmTagKey(0x0012, 0x0052) +#define DCM_LongitudinalTemporalEventType DcmTagKey(0x0012, 0x0053) #define DCM_ClinicalTrialCoordinatingCenterName DcmTagKey(0x0012, 0x0060) #define DCM_PatientIdentityRemoved DcmTagKey(0x0012, 0x0062) #define DCM_DeidentificationMethod DcmTagKey(0x0012, 0x0063) @@ -768,7 +774,9 @@ #define DCM_AnodeTargetMaterial DcmTagKey(0x0018, 0x1191) #define DCM_BodyPartThickness DcmTagKey(0x0018, 0x11a0) #define DCM_CompressionForce DcmTagKey(0x0018, 0x11a2) +#define DCM_CompressionPressure DcmTagKey(0x0018, 0x11a3) #define DCM_PaddleDescription DcmTagKey(0x0018, 0x11a4) +#define DCM_CompressionContactArea DcmTagKey(0x0018, 0x11a5) #define DCM_DateOfLastCalibration DcmTagKey(0x0018, 0x1200) #define DCM_TimeOfLastCalibration DcmTagKey(0x0018, 0x1201) #define DCM_DateTimeOfLastCalibration DcmTagKey(0x0018, 0x1202) @@ -2177,13 +2185,13 @@ #define DCM_Quantity DcmTagKey(0x0040, 0x0294) #define DCM_MeasuringUnitsSequence DcmTagKey(0x0040, 0x0295) #define DCM_BillingItemSequence DcmTagKey(0x0040, 0x0296) -#define DCM_TotalTimeOfFluoroscopy DcmTagKey(0x0040, 0x0300) -#define DCM_TotalNumberOfExposures DcmTagKey(0x0040, 0x0301) +#define DCM_RETIRED_TotalTimeOfFluoroscopy DcmTagKey(0x0040, 0x0300) +#define DCM_RETIRED_TotalNumberOfExposures DcmTagKey(0x0040, 0x0301) #define DCM_EntranceDose DcmTagKey(0x0040, 0x0302) #define DCM_ExposedArea DcmTagKey(0x0040, 0x0303) #define DCM_DistanceSourceToEntrance DcmTagKey(0x0040, 0x0306) #define DCM_RETIRED_DistanceSourceToSupport DcmTagKey(0x0040, 0x0307) -#define DCM_ExposureDoseSequence DcmTagKey(0x0040, 0x030e) +#define DCM_RETIRED_ExposureDoseSequence DcmTagKey(0x0040, 0x030e) #define DCM_CommentsOnRadiationDose DcmTagKey(0x0040, 0x0310) #define DCM_XRayOutput DcmTagKey(0x0040, 0x0312) #define DCM_HalfValueLayer DcmTagKey(0x0040, 0x0314) @@ -2275,7 +2283,7 @@ #define DCM_RETIRED_ReferencedGeneralPurposeScheduledProcedureStepSequence DcmTagKey(0x0040, 0x4016) #define DCM_ScheduledWorkitemCodeSequence DcmTagKey(0x0040, 0x4018) #define DCM_PerformedWorkitemCodeSequence DcmTagKey(0x0040, 0x4019) -#define DCM_InputAvailabilityFlag DcmTagKey(0x0040, 0x4020) +#define DCM_RETIRED_InputAvailabilityFlag DcmTagKey(0x0040, 0x4020) #define DCM_InputInformationSequence DcmTagKey(0x0040, 0x4021) #define DCM_RETIRED_RelevantInformationSequence DcmTagKey(0x0040, 0x4022) #define DCM_RETIRED_ReferencedGeneralPurposeScheduledProcedureStepTransactionUID DcmTagKey(0x0040, 0x4023) @@ -2466,6 +2474,17 @@ #define DCM_SubstanceAdministrationDeviceID DcmTagKey(0x0044, 0x0012) #define DCM_ProductParameterSequence DcmTagKey(0x0044, 0x0013) #define DCM_SubstanceAdministrationParameterSequence DcmTagKey(0x0044, 0x0019) +#define DCM_ApprovalSequence DcmTagKey(0x0044, 0x0100) +#define DCM_AssertionCodeSequence DcmTagKey(0x0044, 0x0101) +#define DCM_AssertionUID DcmTagKey(0x0044, 0x0102) +#define DCM_AsserterIdentificationSequence DcmTagKey(0x0044, 0x0103) +#define DCM_AssertionDateTime DcmTagKey(0x0044, 0x0104) +#define DCM_AssertionExpirationDateTime DcmTagKey(0x0044, 0x0105) +#define DCM_AssertionComments DcmTagKey(0x0044, 0x0106) +#define DCM_RelatedAssertionSequence DcmTagKey(0x0044, 0x0107) +#define DCM_ReferencedAssertionUID DcmTagKey(0x0044, 0x0108) +#define DCM_ApprovalSubjectSequence DcmTagKey(0x0044, 0x0109) +#define DCM_OrganizationalRoleCodeSequence DcmTagKey(0x0044, 0x010a) #define DCM_LensDescription DcmTagKey(0x0046, 0x0012) #define DCM_RightLensSequence DcmTagKey(0x0046, 0x0014) #define DCM_LeftLensSequence DcmTagKey(0x0046, 0x0015) @@ -3184,6 +3203,7 @@ #define DCM_ProcedureStepProgressInformationSequence DcmTagKey(0x0074, 0x1002) #define DCM_ProcedureStepProgress DcmTagKey(0x0074, 0x1004) #define DCM_ProcedureStepProgressDescription DcmTagKey(0x0074, 0x1006) +#define DCM_ProcedureStepProgressParametersSequence DcmTagKey(0x0074, 0x1007) #define DCM_ProcedureStepCommunicationsURISequence DcmTagKey(0x0074, 0x1008) #define DCM_ContactURI DcmTagKey(0x0074, 0x100a) #define DCM_ContactDisplayName DcmTagKey(0x0074, 0x100c) @@ -3313,7 +3333,7 @@ #define DCM_AssessmentObservationsSequence DcmTagKey(0x0082, 0x0007) #define DCM_ObservationSignificance DcmTagKey(0x0082, 0x0008) #define DCM_ObservationDescription DcmTagKey(0x0082, 0x000a) -#define DCM_StructuredContraintObservationSequence DcmTagKey(0x0082, 0x000c) +#define DCM_StructuredConstraintObservationSequence DcmTagKey(0x0082, 0x000c) #define DCM_AssessedAttributeValueSequence DcmTagKey(0x0082, 0x0010) #define DCM_AssessmentSetID DcmTagKey(0x0082, 0x0016) #define DCM_AssessmentRequesterSequence DcmTagKey(0x0082, 0x0017) @@ -3452,7 +3472,7 @@ #define DCM_CreationDate DcmTagKey(0x2100, 0x0040) #define DCM_CreationTime DcmTagKey(0x2100, 0x0050) #define DCM_Originator DcmTagKey(0x2100, 0x0070) -#define DCM_RETIRED_DestinationAE DcmTagKey(0x2100, 0x0140) +#define DCM_DestinationAE DcmTagKey(0x2100, 0x0140) #define DCM_OwnerID DcmTagKey(0x2100, 0x0160) #define DCM_NumberOfFilms DcmTagKey(0x2100, 0x0170) #define DCM_RETIRED_ReferencedPrintJobSequencePullStoredPrint DcmTagKey(0x2100, 0x0500) @@ -3741,17 +3761,18 @@ #define DCM_ReferencedDoseReferenceUID DcmTagKey(0x300a, 0x0083) #define DCM_BeamDose DcmTagKey(0x300a, 0x0084) #define DCM_BeamMeterset DcmTagKey(0x300a, 0x0086) -#define DCM_RETIRED_BeamDosePointDepth DcmTagKey(0x300a, 0x0088) -#define DCM_RETIRED_BeamDosePointEquivalentDepth DcmTagKey(0x300a, 0x0089) -#define DCM_RETIRED_BeamDosePointSSD DcmTagKey(0x300a, 0x008a) +#define DCM_BeamDosePointDepth DcmTagKey(0x300a, 0x0088) +#define DCM_BeamDosePointEquivalentDepth DcmTagKey(0x300a, 0x0089) +#define DCM_BeamDosePointSSD DcmTagKey(0x300a, 0x008a) #define DCM_BeamDoseMeaning DcmTagKey(0x300a, 0x008b) #define DCM_BeamDoseVerificationControlPointSequence DcmTagKey(0x300a, 0x008c) -#define DCM_AverageBeamDosePointDepth DcmTagKey(0x300a, 0x008d) -#define DCM_AverageBeamDosePointEquivalentDepth DcmTagKey(0x300a, 0x008e) -#define DCM_AverageBeamDosePointSSD DcmTagKey(0x300a, 0x008f) +#define DCM_RETIRED_AverageBeamDosePointDepth DcmTagKey(0x300a, 0x008d) +#define DCM_RETIRED_AverageBeamDosePointEquivalentDepth DcmTagKey(0x300a, 0x008e) +#define DCM_RETIRED_AverageBeamDosePointSSD DcmTagKey(0x300a, 0x008f) #define DCM_BeamDoseType DcmTagKey(0x300a, 0x0090) #define DCM_AlternateBeamDose DcmTagKey(0x300a, 0x0091) #define DCM_AlternateBeamDoseType DcmTagKey(0x300a, 0x0092) +#define DCM_DepthValueAveragingFlag DcmTagKey(0x300a, 0x0093) #define DCM_NumberOfBrachyApplicationSetups DcmTagKey(0x300a, 0x00a0) #define DCM_BrachyApplicationSetupDoseSpecificationPoint DcmTagKey(0x300a, 0x00a2) #define DCM_BrachyApplicationSetupDose DcmTagKey(0x300a, 0x00a4) @@ -3935,6 +3956,10 @@ #define DCM_BrachyAccessoryDeviceName DcmTagKey(0x300a, 0x0266) #define DCM_BrachyAccessoryDeviceNominalThickness DcmTagKey(0x300a, 0x026a) #define DCM_BrachyAccessoryDeviceNominalTransmission DcmTagKey(0x300a, 0x026c) +#define DCM_ChannelEffectiveLength DcmTagKey(0x300a, 0x0271) +#define DCM_ChannelInnerLength DcmTagKey(0x300a, 0x0272) +#define DCM_AfterloaderChannelID DcmTagKey(0x300a, 0x0273) +#define DCM_SourceApplicatorTipLength DcmTagKey(0x300a, 0x0274) #define DCM_ChannelSequence DcmTagKey(0x300a, 0x0280) #define DCM_ChannelNumber DcmTagKey(0x300a, 0x0282) #define DCM_ChannelLength DcmTagKey(0x300a, 0x0284) diff --git a/dcmdata/include/dcmtk/dcmdata/dcelem.h b/dcmdata/include/dcmtk/dcmdata/dcelem.h index 0dd220ff..5540eb0f 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcelem.h +++ b/dcmdata/include/dcmtk/dcmdata/dcelem.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -682,7 +682,7 @@ class DCMTK_DCMDATA_EXPORT DcmElement * to even size needed for a buffer into which a frame is to be loaded. * @param dataset dataset in which this pixel data element is contained * @param frameSize frame size in bytes (without padding) returned in this - * parameter upon success + * parameter upon success, otherwise set to 0 * @return EC_Normal if successful, an error code otherwise */ virtual OFCondition getUncompressedFrameSize(DcmItem *dataset, @@ -734,6 +734,17 @@ class DCMTK_DCMDATA_EXPORT DcmElement virtual OFCondition getDecompressedColorModel(DcmItem *dataset, OFString &decompressedColorModel); + /** Determine if this element is universal matching. + * @param normalize normalize each element value. Defaults to OFTrue. + * @param enableWildCardMatching enable or disable wild card matching. Defaults to OFTrue, + * which means wild card matching is performed if the element's VR supports it. Set to + * OFFalse to force single value matching instead. + * @return returns OFTrue if element is empty or if enableWildCardMatching is enabled and + * the element contains only wildcard characters. Returns OFFalse otherwise. + */ + virtual OFBool isUniversalMatch(const OFBool normalize = OFTrue, + const OFBool enableWildCardMatching = OFTrue); + /** perform attribute matching. * Perform attribute matching on a candidate element using this element as the matching * key. diff --git a/dcmdata/include/dcmtk/dcmdata/dcjson.h b/dcmdata/include/dcmtk/dcmdata/dcjson.h old mode 100755 new mode 100644 index ac7a2d2b..173103e8 --- a/dcmdata/include/dcmtk/dcmdata/dcjson.h +++ b/dcmdata/include/dcmtk/dcmdata/dcjson.h @@ -39,36 +39,36 @@ * *

Usage Example:

* @code{.cpp} - #include "dcmtk/dcmdata/dcjson.h" - // ... - DcmFileFormat fileformat; - if(fileformat.loadFile("test.dcm").good()) - { - // print the DICOM file in JSON format - // using the pretty format (muti-line with indention and other whitespace) - fileformat.writeJson(COUT, DcmJsonFormatPretty(OFTrue)); - - // using the compact (single line, without unneeded whitespace) format - fileformat.writeJson(COUT, DcmJsonFormatCompact(OFTrue)); - } - @endcode + * #include "dcmtk/dcmdata/dcjson.h" + * // ... + * DcmFileFormat fileformat; + * if(fileformat.loadFile("test.dcm").good()) + * { + * // print the DICOM file in JSON format + * // using the pretty format (muti-line with indention and other whitespace) + * fileformat.writeJson(COUT, DcmJsonFormatPretty(OFTrue)); + * + * // using the compact (single line, without unneeded whitespace) format + * fileformat.writeJson(COUT, DcmJsonFormatCompact(OFTrue)); + * } + * @endcode *

Implementing a custom formatter:

* @code{.cpp} - struct CustomJsonFormat : DcmJsonFormatPretty - { - CustomJsonFormat(const OFBool printMetaInfo = OFTrue) - : DcmJsonFormatPretty(printMetaInfo) - { - - } - - OFString OFJsonFormatExample::space() - { - // use tabstops instead of spaces for indention - return "\t"; - } - } - @endcode + * struct CustomJsonFormat : DcmJsonFormatPretty + * { + * CustomJsonFormat(const OFBool printMetaInfo = OFTrue) + * : DcmJsonFormatPretty(printMetaInfo) + * { + * + * } + * + * OFString OFJsonFormatExample::space() + * { + * // use tabstops instead of spaces for indention + * return "\t"; + * } + * } + * @endcode */ class DCMTK_DCMDATA_EXPORT DcmJsonFormat { @@ -140,13 +140,13 @@ public: * remove leading zeros, except before dot. * @b Example: * @code{.txt} - 00.123 --> 0.123 - 023.12 --> 23.12 - -01.00 --> -1.00 - 0200 --> 200 - .12 --> 0.12 - 000.1 --> 0.1 - @endcode + * 00.123 --> 0.123 + * 023.12 --> 23.12 + * -01.00 --> -1.00 + * 0200 --> 200 + * .12 --> 0.12 + * 000.1 --> 0.1 + * @endcode * @param value String that should be normalize */ static void normalizeDecimalString(OFString &value); @@ -155,11 +155,11 @@ public: * remove leading zeros, except before dot. * @b Example: * @code{.txt} - 000 --> 0 - 023 --> 23 - -01 --> -1 - 0200 --> 200 - @endcode + * 000 --> 0 + * 023 --> 23 + * -01 --> -1 + * 0200 --> 200 + * @endcode * @param value String that should be normalize */ static void normalizeIntegerString(OFString &value); @@ -231,30 +231,30 @@ public: * @details *

Usage Example:

* @code{.cpp} - struct BulkDataURIJsonFormat : DcmJsonFormatPretty - { - CustomJsonFormat(const OFBool printMetaInfo = OFTrue, - ... bulkDataURIDatabase) - : DcmJsonFormatPretty(printMetaInfo) - , TheDatabase(bulkDataURIDatabase) - { - - } - - virtual OFBool asBulkDataURI(const DcmTagKey& tag, OFString& uri) - { - ... result = TheDatabase.findBulkDataFor(tag); - if (result.found()) - { - uri = result.uri(); - return OFTrue; - } - return OFFalse; - } - - ... TheDatabase; - } - @endcode + * struct BulkDataURIJsonFormat : DcmJsonFormatPretty + * { + * CustomJsonFormat(const OFBool printMetaInfo = OFTrue, + * ... bulkDataURIDatabase) + * : DcmJsonFormatPretty(printMetaInfo) + * , TheDatabase(bulkDataURIDatabase) + * { + * + * } + * + * virtual OFBool asBulkDataURI(const DcmTagKey& tag, OFString& uri) + * { + * ... result = TheDatabase.findBulkDataFor(tag); + * if (result.found()) + * { + * uri = result.uri(); + * return OFTrue; + * } + * return OFFalse; + * } + * + * ... TheDatabase; + * } + * @endcode */ virtual OFBool asBulkDataURI(const DcmTagKey& tag, OFString& uri); @@ -262,8 +262,8 @@ public: * with indention and newlines as in the format Variable given. * @b Example: * @code{.txt} - ,"Value":[ - @endcode + * ,"Value":[ + * @endcode * @param out output stream to which the Value prefix is written */ virtual void printValuePrefix(STD_NAMESPACE ostream &out); @@ -272,8 +272,8 @@ public: * with indention and newlines as in the format Variable given. * @b Example: * @code{.txt} - ]\n - @endcode + * ]\n + * @endcode * @param out output stream to which the Value prefix is written */ virtual void printValueSuffix(STD_NAMESPACE ostream &out); @@ -282,8 +282,8 @@ public: * with indention and newlines as in the format Variable given. * @b Example: * @code{.txt} - ,"BulkDataURI": - @endcode + * ,"BulkDataURI": + * @endcode * @param out output stream to which the Value prefix is written */ virtual void printBulkDataURIPrefix(STD_NAMESPACE ostream &out); @@ -292,8 +292,8 @@ public: * with indention and newlines as the format specifies. * @b Example: * @code{.txt} - ,"InlineBinary": - @endcode + * ,"InlineBinary": + * @endcode * @param out output stream to which the Value prefix is written */ virtual void printInlineBinaryPrefix(STD_NAMESPACE ostream &out); @@ -302,9 +302,9 @@ public: * indention and newlines as the format specifies. * @b Example: * @code{.txt} - Example,\n - Example... - @endcode + * Example,\n + * Example... + * @endcode * @param out output stream to which the Value prefix is written */ virtual void printNextArrayElementPrefix(STD_NAMESPACE ostream &out); diff --git a/dcmdata/include/dcmtk/dcmdata/dcmatch.h b/dcmdata/include/dcmtk/dcmdata/dcmatch.h index 440b5460..1c338966 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcmatch.h +++ b/dcmdata/include/dcmtk/dcmdata/dcmatch.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017, OFFIS e.V. + * Copyright (C) 2017-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -196,19 +196,19 @@ public: * @param candidateSize the size (in bytes) of the data candidateData refers to. * @return compares the query data with the candidate data using the appropriate * matching function for the given VR, returns OFTrue if they match, OFFalse - * if not or if an error occured. + * if not or if an error occurred. * @details * @pre (*this) must have been constructed for a specific VR that matches the one * of the query and candidate data, i.e.\ !(*this) must evaluate to OFFalse. * @details *

Usage Example

* @code{.cpp} - DcmAttributeMatching match( EVR_DA ); - match( "20160101-20181231", 17, "20170713", 8 ); // -> OFTrue - match = DcmAttributeMatching( EVR_TM ); - match( "-12", 3, "11", 2 ) // -> OFTrue - DcmAttributeMatching( EVR_PN )( "M?ller", 6, "^Martin", 7 ) // -> OFFalse - @endcode + * DcmAttributeMatching match( EVR_DA ); + * match( "20160101-20181231", 17, "20170713", 8 ); // -> OFTrue + * match = DcmAttributeMatching( EVR_TM ); + * match( "-12", 3, "11", 2 ) // -> OFTrue + * DcmAttributeMatching( EVR_PN )( "M?ller", 6, "^Martin", 7 ) // -> OFFalse + * @endcode */ OFBool operator()( const void* queryData, const size_t querySize, const void* candidateData, const size_t candidateSize ) const; diff --git a/dcmdata/include/dcmtk/dcmdata/dcostrmb.h b/dcmdata/include/dcmtk/dcmdata/dcostrmb.h index 386d2beb..9e2409a9 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcostrmb.h +++ b/dcmdata/include/dcmtk/dcmdata/dcostrmb.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2011, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -36,7 +36,7 @@ public: /** constructor * @param buf buffer in which data is stored. Must be allocated * by caller and remain valid during the lifetime of this object. - * @param bufLen buffer length, must be even number > 0. + * @param bufLen buffer length, must be even number (0 permitted). */ DcmBufferConsumer(void *buf, offile_off_t bufLen); diff --git a/dcmdata/include/dcmtk/dcmdata/dcpath.h b/dcmdata/include/dcmtk/dcmdata/dcpath.h index e6a61a6b..fe229f38 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcpath.h +++ b/dcmdata/include/dcmtk/dcmdata/dcpath.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2008-2012, OFFIS e.V. + * Copyright (C) 2008-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -295,8 +295,8 @@ public: * (in total 2 sequences, 2 items, and one leaf attribute). * @param obj [in] The object to search (or create) a path in * @param path [in] The path either starting with an attribute (either a - * sequence or a a leaf attribute as a dicitionary name or - * tag) or starting with an item + * sequence or a leaf attribute as a dictionary name or tag) or + * starting with an item * @param createIfNecessary [in] If set, all missing objects found * in the path string are created. If not set, * only existing paths can be accessed and @@ -325,8 +325,8 @@ public: * deleted by the function. * @param obj [in] The object to delete attribute or item from * @param path [in] The path either starting with an attribute (either a - * sequence or a a leaf attribute as a dicitionary name or - * tag) or starting with an item + * sequence or a leaf attribute as a dictionary name or tag) or + * starting with an item * @param numDeleted [out] Number of deleted attributes/items * @return EC_Normal if successful, error code otherwise. If the desired * attribute/item was not found, EC_TagNotFound is returned. @@ -361,8 +361,7 @@ public: OFCondition applyPathWithValue(DcmDataset* dataset, const OFString& overrideKey); - /** Deconstructor, cleans up memory that was allocated for any - * search results. + /** Destructor, cleans up memory that was allocated for any search results. */ ~DcmPathProcessor(); @@ -397,8 +396,8 @@ protected: * (in total 2 sequences, 2 items, and one leaf attribute). * @param item [in] The object to search (or create) a path in * @param path [in] The path starting with an attribute (either a - * sequence or a a leaf attribute) as a dicitionary name or - * tag. The parsed attribute is removed from the path string. + * sequence or a leaf attribute) as a dictionary name or tag. + * The parsed attribute is removed from the path string. * @return EC_Normal if successful, error code otherwise. */ OFCondition findOrCreateItemPath(DcmItem* item, diff --git a/dcmdata/include/dcmtk/dcmdata/dcpixel.h b/dcmdata/include/dcmtk/dcmdata/dcpixel.h index 26e9273e..f8dc5057 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcpixel.h +++ b/dcmdata/include/dcmtk/dcmdata/dcpixel.h @@ -53,7 +53,7 @@ public: virtual ~DcmRepresentationParameter() {} /** this methods creates a copy of type DcmRepresentationParameter * - * it must be overweritten in every subclass. + * it must be overwritten in every subclass. * @return copy of this object */ virtual DcmRepresentationParameter *clone() const = 0; @@ -161,7 +161,7 @@ private: /// current list element for some operations DcmRepresentationListIterator current; - /// shows if an unecapsulated representation is stored + /// shows if an unencapsulated representation is stored OFBool existUnencapsulated; /** this flag indicates that this pixel data element will be written @@ -306,9 +306,9 @@ public: /** set/change the current value representation of the uncompressed image representation, if any * @param vr new value representation to be set. All VRs except for OW (Other - * Word String) are treated as 8 bit data (OB). This is particularily useful + * Word String) are treated as 8 bit data (OB). This is particularly useful * for unknown (UN) or unsupported VRs. - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition setVR(DcmEVR vr); @@ -495,9 +495,9 @@ public: const Uint32 length, const E_ByteOrder byteOrder); - /** get a specific exisiting Representation, creates no representation + /** get a specific existing Representation, creates no representation * if repParam is NULL, then the representation conforming to the default - * presentationParameters (defined with the codec) is returned. + * representationParameters (defined with the codec) is returned. */ OFCondition getEncapsulatedRepresentation( const E_TransferSyntax repType, diff --git a/dcmdata/include/dcmtk/dcmdata/dcpxitem.h b/dcmdata/include/dcmtk/dcmdata/dcpxitem.h index 220cc94f..77e44935 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcpxitem.h +++ b/dcmdata/include/dcmtk/dcmdata/dcpxitem.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -119,10 +119,16 @@ class DCMTK_DCMDATA_EXPORT DcmPixelItem : public DcmOtherByteOtherWord const char *pixelFileName = NULL, size_t *pixelCounter = NULL); - /** creates in this object an offset table for a compressed pixel sequence. - * @param offsetList list of size entries for each individual encoded frame - * provided by the compression codec. All entries are expected to have - * an even value (i.e. the pixel items are padded). + /** @copydoc DcmObject::calcElementLength() + */ + virtual Uint32 calcElementLength(const E_TransferSyntax xfer, + const E_EncodingType enctype); + + /** creates in this object an offset table for a compressed pixel sequence + * @param offsetList list of size entries (i.e. number of bytes) for each + * individual frame, including item header (8 bytes) of all associated + * pixel items. All entries are expected to have an even value (i.e. the + * pixel items are padded). * @return EC_Normal if successful, an error code otherwise */ virtual OFCondition createOffsetTable(const DcmOffsetList &offsetList); diff --git a/dcmdata/include/dcmtk/dcmdata/dcuid.h b/dcmdata/include/dcmtk/dcmdata/dcuid.h index 0762a994..e8b4320a 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcuid.h +++ b/dcmdata/include/dcmtk/dcmdata/dcuid.h @@ -526,6 +526,7 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID #define UID_BasicStructuredDisplayStorage "1.2.840.10008.5.1.4.1.1.131" #define UID_CTDefinedProcedureProtocolStorage "1.2.840.10008.5.1.4.1.1.200.1" #define UID_CTPerformedProcedureProtocolStorage "1.2.840.10008.5.1.4.1.1.200.2" +#define UID_ProtocolApprovalStorage "1.2.840.10008.5.1.4.1.1.200.3" #define UID_RTImageStorage "1.2.840.10008.5.1.4.1.1.481.1" #define UID_RTDoseStorage "1.2.840.10008.5.1.4.1.1.481.2" #define UID_RTStructureSetStorage "1.2.840.10008.5.1.4.1.1.481.3" @@ -636,6 +637,11 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID #define UID_MOVEDefinedProcedureProtocolInformationModel "1.2.840.10008.5.1.4.20.2" #define UID_GETDefinedProcedureProtocolInformationModel "1.2.840.10008.5.1.4.20.3" +// Protocol Approval Query/Retrieve +#define UID_FINDProtocolApprovalInformationModel "1.2.840.10008.5.1.4.1.1.200.4" +#define UID_MOVEProtocolApprovalInformationModel "1.2.840.10008.5.1.4.1.1.200.5" +#define UID_GETProtocolApprovalInformationModel "1.2.840.10008.5.1.4.1.1.200.6" + // Print Management #define UID_BasicFilmSessionSOPClass "1.2.840.10008.5.1.1.1" #define UID_BasicFilmBoxSOPClass "1.2.840.10008.5.1.1.2" diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrae.h b/dcmdata/include/dcmtk/dcmdata/dcvrae.h index ef8dd489..d13c18bd 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrae.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrae.h @@ -113,6 +113,10 @@ class DCMTK_DCMDATA_EXPORT DcmApplicationEntity const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; + /// @copydoc DcmElement::isUniversalMatch() + virtual OFBool isUniversalMatch(const OFBool normalize = OFTrue, + const OFBool enableWildCardMatching = OFTrue); + /* --- static helper functions --- */ /** check whether given string value conforms to the VR "AE" (Application Entity) diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrat.h b/dcmdata/include/dcmtk/dcmdata/dcvrat.h index 51ba17a6..6cfb93a2 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrat.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrat.h @@ -69,7 +69,7 @@ class DCMTK_DCMDATA_EXPORT DcmAttributeTag * with a given object of the same type. The tag of the element is also * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value - * components of the object, preferrably in the order declared in the + * components of the object, preferably in the order declared in the * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. @@ -161,7 +161,7 @@ class DCMTK_DCMDATA_EXPORT DcmAttributeTag /** get particular tag value * @param tagVal reference to result variable (cleared in case of error) * @param pos index of the value to be retrieved (0..vm-1) - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getTagVal(DcmTagKey &tagVal, const unsigned long pos = 0); @@ -236,6 +236,10 @@ class DCMTK_DCMDATA_EXPORT DcmAttributeTag */ virtual OFCondition verify(const OFBool autocorrect = OFFalse); + /// @copydoc DcmElement::isUniversalMatch() + virtual OFBool isUniversalMatch(const OFBool normalize = OFTrue, + const OFBool enableWildCardMatching = OFTrue); + /* --- static helper functions --- */ /** check whether given string value conforms to the VR "AT" (Attribute Tag) diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrcs.h b/dcmdata/include/dcmtk/dcmdata/dcvrcs.h index 27e1fe41..23e8daea 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrcs.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrcs.h @@ -113,6 +113,10 @@ class DCMTK_DCMDATA_EXPORT DcmCodeString const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; + /// @copydoc DcmElement::isUniversalMatch() + virtual OFBool isUniversalMatch(const OFBool normalize = OFTrue, + const OFBool enableWildCardMatching = OFTrue); + /* --- static helper functions --- */ /** check whether given value conforms to value representation CS (Code String). diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrfd.h b/dcmdata/include/dcmtk/dcmdata/dcvrfd.h index 485e3048..b78108dd 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrfd.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrfd.h @@ -65,7 +65,7 @@ class DCMTK_DCMDATA_EXPORT DcmFloatingPointDouble * with a given object of the same type. The tag of the element is also * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value - * components of the object, preferrably in the order declared in the + * components of the object, preferably in the order declared in the * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrfl.h b/dcmdata/include/dcmtk/dcmdata/dcvrfl.h index 4b13ebd4..81b41547 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrfl.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrfl.h @@ -65,7 +65,7 @@ class DCMTK_DCMDATA_EXPORT DcmFloatingPointSingle * with a given object of the same type. The tag of the element is also * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value - * components of the object, preferrably in the order declared in the + * components of the object, preferably in the order declared in the * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvris.h b/dcmdata/include/dcmtk/dcmdata/dcvris.h index b0b38469..3854f1d6 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvris.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvris.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -101,7 +101,7 @@ class DCMTK_DCMDATA_EXPORT DcmIntegerString /** get particular integer value * @param sintVal reference to result variable * @param pos index of the value to be retrieved (0..vm-1) - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getSint32(Sint32 &sintVal, const unsigned long pos = 0); diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrobow.h b/dcmdata/include/dcmtk/dcmdata/dcvrobow.h index 7e0237f2..b9e1dbd6 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrobow.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrobow.h @@ -60,7 +60,7 @@ class DCMTK_DCMDATA_EXPORT DcmOtherByteOtherWord * with a given object of the same type. The tag of the element is also * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value - * components of the object, preferrably in the order declared in the + * components of the object, preferably in the order declared in the * object (if applicable). The implementation for DcmOtherByteOtherWord * does compare the values of two elements in local endianness. * @param rhs the right hand side of the comparison @@ -129,9 +129,9 @@ class DCMTK_DCMDATA_EXPORT DcmOtherByteOtherWord /** set/change the current value representation * @param vr new value representation to be set. All VRs except for OW (Other - * Word String) are treated as 8 bit data (OB). This is particularily useful + * Word String) are treated as 8 bit data (OB). This is particularly useful * for unknown (UN) or unsupported VRs. - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition setVR(DcmEVR vr); @@ -211,7 +211,7 @@ class DCMTK_DCMDATA_EXPORT DcmOtherByteOtherWord * This method is only applicable to OW data. * @param wordVal reference to result variable (cleared in case of error) * @param pos index of the value to be retrieved (0..vm-1) - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getUint16(Uint16 &wordVal, const unsigned long pos = 0); @@ -219,14 +219,14 @@ class DCMTK_DCMDATA_EXPORT DcmOtherByteOtherWord /** get reference to stored 8 bit data. * This method is only applicable to non-OW data, e.g. OB. * @param byteVals reference to result variable - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getUint8Array(Uint8 *&byteVals); /** get reference to stored 16 bit data. * This method is only applicable to OW data. * @param wordVals reference to result variable - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getUint16Array(Uint16 *&wordVals); diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrsl.h b/dcmdata/include/dcmtk/dcmdata/dcvrsl.h index 5e221c32..2ae66a73 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrsl.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrsl.h @@ -65,7 +65,7 @@ class DCMTK_DCMDATA_EXPORT DcmSignedLong * with a given object of the same type. The tag of the element is also * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value - * components of the object, preferrably in the order declared in the + * components of the object, preferably in the order declared in the * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. @@ -139,7 +139,7 @@ class DCMTK_DCMDATA_EXPORT DcmSignedLong /** get particular integer value * @param sintVal reference to result variable (cleared in case of error) * @param pos index of the value to be retrieved (0..vm-1) - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getSint32(Sint32 &sintVal, const unsigned long pos = 0); diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrss.h b/dcmdata/include/dcmtk/dcmdata/dcvrss.h index 1556b1a9..9208ad95 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrss.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrss.h @@ -59,7 +59,7 @@ class DCMTK_DCMDATA_EXPORT DcmSignedShort * with a given object of the same type. The tag of the element is also * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value - * components of the object, preferrably in the order declared in the + * components of the object, preferably in the order declared in the * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. @@ -140,7 +140,7 @@ class DCMTK_DCMDATA_EXPORT DcmSignedShort /** get particular integer value * @param sintVal reference to result variable (cleared in case of error) * @param pos index of the value to be retrieved (0..vm-1) - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getSint16(Sint16 &sintVal, const unsigned long pos = 0); diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrul.h b/dcmdata/include/dcmtk/dcmdata/dcvrul.h index bb56d62a..60dad2ef 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrul.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrul.h @@ -139,7 +139,7 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedLong /** get particular integer value * @param uintVal reference to result variable (cleared in case of error) * @param pos index of the value to be retrieved (0..vm-1) - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getUint32(Uint32 &uintVal, const unsigned long pos = 0); diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrur.h b/dcmdata/include/dcmtk/dcmdata/dcvrur.h index 75273792..ff8e67b9 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrur.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrur.h @@ -128,6 +128,10 @@ class DCMTK_DCMDATA_EXPORT DcmUniversalResourceIdentifierOrLocator const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; + /// @copydoc DcmElement::isUniversalMatch() + virtual OFBool isUniversalMatch(const OFBool normalize = OFTrue, + const OFBool enableWildCardMatching = OFTrue); + /* --- static helper functions --- */ /** check whether given string value conforms to the VR "UR" (Universal Resource Identifier diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrus.h b/dcmdata/include/dcmtk/dcmdata/dcvrus.h index 70218339..8b0c73bf 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrus.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrus.h @@ -55,7 +55,7 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedShort * with a given object of the same type. The tag of the element is also * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value - * components of the object, preferrably in the order declared in the + * components of the object, preferably in the order declared in the * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. @@ -139,7 +139,7 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedShort /** get particular integer value * @param uintVal reference to result variable (cleared in case of error) * @param pos index of the value to be retrieved (0..vm-1) - * @return status status, EC_Normal if successful, an error code otherwise + * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition getUint16(Uint16 &uintVal, const unsigned long pos = 0); @@ -207,6 +207,7 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedShort /// @copydoc DcmElement::matches() virtual OFBool matches(const DcmElement& candidate, const OFBool enableWildCardMatching = OFTrue) const; + protected: /** constructor. Create new element from given tag and length. diff --git a/dcmdata/libi2d/Makefile.dep b/dcmdata/libi2d/Makefile.dep index 963343db..5c244c15 100644 --- a/dcmdata/libi2d/Makefile.dep +++ b/dcmdata/libi2d/Makefile.dep @@ -1,21 +1,23 @@ -i2d.o: i2d.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmdata/libi2d/i2d.h \ - ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ - ../../oflog/include/dcmtk/oflog/oflog.h \ - ../../oflog/include/dcmtk/oflog/logger.h \ - ../../oflog/include/dcmtk/oflog/config.h \ +i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/libi2d/i2dbmps.h \ + ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../oflog/include/dcmtk/oflog/tstring.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ @@ -40,47 +42,37 @@ i2d.o: i2d.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ - ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ - ../include/dcmtk/dcmdata/dcobject.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ - ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ - ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ + ../include/dcmtk/dcmdata/libi2d/i2define.h \ + ../include/dcmtk/dcmdata/dcerror.h \ + ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ + ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ + ../include/dcmtk/dcmdata/dcobject.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \ - ../include/dcmtk/dcmdata/dcelem.h \ - ../include/dcmtk/dcmdata/libi2d/i2define.h \ - ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ - ../include/dcmtk/dcmdata/dcpixel.h ../include/dcmtk/dcmdata/dcvrpobw.h \ - ../include/dcmtk/dcmdata/dcvrobow.h ../include/dcmtk/dcmdata/dcpxitem.h \ - ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcfilefo.h \ - ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcdeftag.h \ - ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcpixseq.h \ - ../include/dcmtk/dcmdata/dcpath.h -i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmdata/libi2d/i2dbmps.h \ - ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../include/dcmtk/dcmdata/dcelem.h +i2d.o: i2d.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/libi2d/i2d.h \ + ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ - ../../oflog/include/dcmtk/oflog/oflog.h \ - ../../oflog/include/dcmtk/oflog/logger.h \ - ../../oflog/include/dcmtk/oflog/config.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ @@ -105,19 +97,27 @@ i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ - ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ - ../include/dcmtk/dcmdata/libi2d/i2define.h \ - ../include/dcmtk/dcmdata/dcerror.h \ - ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ - ../include/dcmtk/dcmdata/dcobject.h ../include/dcmtk/dcmdata/dctag.h \ + ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ + ../include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ + ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \ - ../include/dcmtk/dcmdata/dcelem.h + ../include/dcmtk/dcmdata/dcelem.h \ + ../include/dcmtk/dcmdata/libi2d/i2define.h \ + ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ + ../include/dcmtk/dcmdata/dcpixel.h ../include/dcmtk/dcmdata/dcvrpobw.h \ + ../include/dcmtk/dcmdata/dcvrobow.h ../include/dcmtk/dcmdata/dcpxitem.h \ + ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcfilefo.h \ + ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcdeftag.h \ + ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcpixseq.h \ + ../include/dcmtk/dcmdata/dcpath.h i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/libi2d/i2djpgs.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ diff --git a/dcmdata/libi2d/i2djpgs.cc b/dcmdata/libi2d/i2djpgs.cc index 885cd99f..27bbc0c3 100644 --- a/dcmdata/libi2d/i2djpgs.cc +++ b/dcmdata/libi2d/i2djpgs.cc @@ -552,19 +552,29 @@ OFCondition I2DJpegSource::extractRawJPEGStream(char*& pixelData, } // read block offile_off_t blockSize = endOfBlock - jpegFile.ftell(); - size_t result = jpegFile.fread (currBufferPos, 1, OFstatic_cast(size_t, blockSize)); - if (result != OFstatic_cast(size_t, blockSize)) - return EC_IllegalCall; - // prepare for reading next block - if (!finished) + if (blockSize < 0) + { + DCMDATA_LIBI2D_ERROR("Length field in JPEG data bigger than remaining file"); + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Length field in JPEG data bigger than remaining file"); + } + if (cond.good()) { - jpegFile.fseek(startOfNextBlock, SEEK_SET); - currBufferPos += blockSize; + size_t result = jpegFile.fread (currBufferPos, 1, OFstatic_cast(size_t, blockSize)); + if (result != OFstatic_cast(size_t, blockSize)) + cond = EC_IllegalCall; + else if (!finished) + { + jpegFile.fseek(startOfNextBlock, SEEK_SET); + currBufferPos += blockSize; + } } } // update result variable pixLength = OFstatic_cast(Uint32, rawStreamSize); - + if (cond.bad()) + { + delete[] pixelData; + } return cond; } diff --git a/dcmdata/libsrc/Makefile.dep b/dcmdata/libsrc/Makefile.dep index bc6d6fdd..91da0816 100644 --- a/dcmdata/libsrc/Makefile.dep +++ b/dcmdata/libsrc/Makefile.dep @@ -474,6 +474,19 @@ dcdicent.o: dcdicent.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h +dcdictbi.o: dcdictbi.cc ../include/dcmtk/dcmdata/dcdict.h \ + ../../config/include/dcmtk/config/osconfig.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../include/dcmtk/dcmdata/dchashdi.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../include/dcmtk/dcmdata/dcdefine.h dcdict.o: dcdict.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -524,19 +537,6 @@ dcdict.o: dcdict.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h -dcdictbi.o: dcdictbi.cc ../include/dcmtk/dcmdata/dcdict.h \ - ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ - ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ - ../../ofstd/include/dcmtk/ofstd/ofcast.h \ - ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../include/dcmtk/dcmdata/dchashdi.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ - ../include/dcmtk/dcmdata/dcdefine.h dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ @@ -1254,8 +1254,9 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../include/dcmtk/dcmdata/dcvrtm.h \ ../../ofstd/include/dcmtk/ofstd/diag/push.def \ - ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ - ../../ofstd/include/dcmtk/ofstd/diag/pop.def + ../../ofstd/include/dcmtk/ofstd/diag/shadow.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ @@ -2450,27 +2451,25 @@ dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \ ../../config/include/dcmtk/config/arith.h \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofcrc32.h \ - ../../ofstd/include/dcmtk/ofstd/ofnetdb.h -dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmdata/dcvr.h \ - ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ - ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofsockad.h +dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/dcvrae.h ../include/dcmtk/dcmdata/dcbytstr.h \ + ../include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dctypes.h \ - ../../oflog/include/dcmtk/oflog/oflog.h \ - ../../oflog/include/dcmtk/oflog/logger.h \ - ../../oflog/include/dcmtk/oflog/config.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ @@ -2492,14 +2491,22 @@ dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ - ../../ofstd/include/dcmtk/ofstd/oferror.h -dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmdata/dcvrae.h ../include/dcmtk/dcmdata/dcbytstr.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ + ../include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ + ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ + ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ + ../include/dcmtk/dcmdata/dcmatch.h +dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/dcvras.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -2549,26 +2556,31 @@ dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ - ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ - ../include/dcmtk/dcmdata/dcmatch.h -dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmdata/dcvras.h ../include/dcmtk/dcmdata/dcbytstr.h \ - ../include/dcmtk/dcmdata/dctypes.h \ - ../../oflog/include/dcmtk/oflog/oflog.h \ - ../../oflog/include/dcmtk/oflog/logger.h \ - ../../oflog/include/dcmtk/oflog/config.h \ + ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h +dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../include/dcmtk/dcmdata/dcvrat.h ../include/dcmtk/dcmdata/dcelem.h \ + ../include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \ + ../include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../oflog/include/dcmtk/oflog/tstring.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ @@ -2590,23 +2602,16 @@ dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ - ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ - ../include/dcmtk/dcmdata/dcobject.h \ - ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ - ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ - ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h -dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../include/dcmtk/dcmdata/dcvrat.h ../include/dcmtk/dcmdata/dcelem.h \ - ../include/dcmtk/dcmdata/dcobject.h \ + ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ + ../include/dcmtk/dcmdata/dcjson.h +dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -2614,11 +2619,9 @@ dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../include/dcmtk/dcmdata/dcerror.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \ - ../include/dcmtk/dcmdata/dctypes.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ @@ -2650,12 +2653,10 @@ dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ - ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ - ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ - ../include/dcmtk/dcmdata/dcjson.h + ../../ofstd/include/dcmtk/ofstd/oferror.h dcvrcs.o: dcvrcs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcvrcs.h ../include/dcmtk/dcmdata/dcbytstr.h \ diff --git a/dcmdata/libsrc/dcchrstr.cc b/dcmdata/libsrc/dcchrstr.cc index 28c34e98..305146d6 100644 --- a/dcmdata/libsrc/dcchrstr.cc +++ b/dcmdata/libsrc/dcchrstr.cc @@ -270,6 +270,28 @@ const OFString& DcmCharString::getDelimiterChars() const } +OFBool DcmCharString::isUniversalMatch(const OFBool normalize, + const OFBool enableWildCardMatching) +{ + if(!isEmpty(normalize)) + { + if(enableWildCardMatching) + { + OFString value; + for(unsigned long valNo = 0; valNo < getVM(); ++valNo) + { + getOFString(value, valNo, normalize); + if(value.find_first_not_of( '*' ) != OFString_npos) + return OFFalse; + } + } + else + return OFFalse; + } + return OFTrue; +} + + OFBool DcmCharString::matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching) const diff --git a/dcmdata/libsrc/dcdict.cc b/dcmdata/libsrc/dcdict.cc index a3eb1617..d9d27888 100644 --- a/dcmdata/libsrc/dcdict.cc +++ b/dcmdata/libsrc/dcdict.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -805,10 +805,15 @@ void GlobalDcmDataDictionary::createDataDict() #ifdef WITH_THREADS dataDictLock.wrlock(); #endif + #ifdef DONT_LOAD_EXTERNAL_DICTIONARIES - const OFBool loadExternal = OFFalse; -#else + #error "The macro DONT_LOAD_EXTERNAL_DICTIONARIES has been defined in older versions of DCMTK. Undefine ENABLE_EXTERNAL_DICTIONARY instead." +#endif + +#ifdef ENABLE_EXTERNAL_DICTIONARY const OFBool loadExternal = OFTrue; +#else + const OFBool loadExternal = OFFalse; #endif /* Make sure no other thread managed to create the dictionary * before we got our write lock. */ diff --git a/dcmdata/libsrc/dcdictbi.cc b/dcmdata/libsrc/dcdictbi.cc index ec01c789..c0470345 100644 --- a/dcmdata/libsrc/dcdictbi.cc +++ b/dcmdata/libsrc/dcdictbi.cc @@ -4,7 +4,7 @@ ** ** User: joergr ** Host: thinkpad -** Date: 2017-06-15 10:51:06 +** Date: 2017-12-07 15:02:17 ** Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdictbi ** ** From: ../data/dicom.dic @@ -544,6 +544,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_UI, "SOPClassesInStudy", 1, -1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0008, 0x0063, 0x0008, 0x0063, + EVR_SQ, "AnatomicRegionsInStudyCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0008, 0x0064, 0x0008, 0x0064, EVR_CS, "ConversionType", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -628,6 +632,14 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_LT, "ExtendedCodeMeaning", 1, 1, "DICOM/DICOS", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0008, 0x0109, 0x0008, 0x0109, + EVR_SQ, "CodingSchemeResourcesSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0008, 0x010a, 0x0008, 0x010a, + EVR_CS, "CodingSchemeURLType", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0008, 0x010b, 0x0008, 0x010b, EVR_CS, "ContextGroupExtensionFlag", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -640,6 +652,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_UI, "ContextGroupExtensionCreatorUID", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0008, 0x010e, 0x0008, 0x010e, + EVR_UR, "CodingSchemeURL", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0008, 0x010f, 0x0008, 0x010f, EVR_CS, "ContextIdentifier", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -1073,7 +1089,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0008, 0x2229, 0x0008, 0x2229, - EVR_SQ, "AnatomicStructureSpaceOrRegionSequence", 1, 1, "DICOM", + EVR_SQ, "RETIRED_AnatomicStructureSpaceOrRegionSequence", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0008, 0x2230, 0x0008, 0x2230, @@ -2772,6 +2788,14 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_ST, "ClinicalTrialTimePointDescription", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0012, 0x0052, 0x0012, 0x0052, + EVR_FD, "LongitudinalTemporalOffsetFromEvent", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0012, 0x0053, 0x0012, 0x0053, + EVR_CS, "LongitudinalTemporalEventType", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0012, 0x0060, 0x0012, 0x0060, EVR_LO, "ClinicalTrialCoordinatingCenterName", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -2963,11 +2987,11 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { "SIEMENS CM VA0 CMS" } #endif , { 0x0014, 0x0023, 0x0014, 0x0023, - EVR_ST, "RETIRED_CADFileFormat", 1, -1, "DICOM/retired", + EVR_ST, "RETIRED_CADFileFormat", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0014, 0x0024, 0x0014, 0x0024, - EVR_ST, "RETIRED_ComponentReferenceSystem", 1, -1, "DICOM/retired", + EVR_ST, "RETIRED_ComponentReferenceSystem", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0014, 0x0025, 0x0014, 0x0025, @@ -2999,7 +3023,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0014, 0x0045, 0x0014, 0x0045, - EVR_ST, "RETIRED_MaterialPropertiesFileFormatRetired", 1, -1, "DICOM/retired", + EVR_ST, "RETIRED_MaterialPropertiesFileFormatRetired", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0014, 0x0046, 0x0014, 0x0046, @@ -4424,10 +4448,18 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_DS, "CompressionForce", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0018, 0x11a3, 0x0018, 0x11a3, + EVR_DS, "CompressionPressure", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0018, 0x11a4, 0x0018, 0x11a4, EVR_LO, "PaddleDescription", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0018, 0x11a5, 0x0018, 0x11a5, + EVR_DS, "CompressionContactArea", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0018, 0x1200, 0x0018, 0x1200, EVR_DA, "DateOfLastCalibration", 1, -1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -17999,11 +18031,11 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0x0300, 0x0040, 0x0300, - EVR_US, "TotalTimeOfFluoroscopy", 1, 1, "DICOM", + EVR_US, "RETIRED_TotalTimeOfFluoroscopy", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0x0301, 0x0040, 0x0301, - EVR_US, "TotalNumberOfExposures", 1, 1, "DICOM", + EVR_US, "RETIRED_TotalNumberOfExposures", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0x0302, 0x0040, 0x0302, @@ -18023,7 +18055,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0x030e, 0x0040, 0x030e, - EVR_SQ, "ExposureDoseSequence", 1, 1, "DICOM", + EVR_SQ, "RETIRED_ExposureDoseSequence", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0x0310, 0x0040, 0x0310, @@ -18391,7 +18423,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0x4020, 0x0040, 0x4020, - EVR_CS, "InputAvailabilityFlag", 1, 1, "DICOM", + EVR_CS, "RETIRED_InputAvailabilityFlag", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0x4021, 0x0040, 0x4021, @@ -19822,6 +19854,50 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_SQ, "SubstanceAdministrationParameterSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0044, 0x0100, 0x0044, 0x0100, + EVR_SQ, "ApprovalSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0101, 0x0044, 0x0101, + EVR_SQ, "AssertionCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0102, 0x0044, 0x0102, + EVR_UI, "AssertionUID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0103, 0x0044, 0x0103, + EVR_SQ, "AsserterIdentificationSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0104, 0x0044, 0x0104, + EVR_DT, "AssertionDateTime", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0105, 0x0044, 0x0105, + EVR_DT, "AssertionExpirationDateTime", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0106, 0x0044, 0x0106, + EVR_UT, "AssertionComments", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0107, 0x0044, 0x0107, + EVR_SQ, "RelatedAssertionSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0108, 0x0044, 0x0108, + EVR_UI, "ReferencedAssertionUID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x0109, 0x0044, 0x0109, + EVR_SQ, "ApprovalSubjectSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0044, 0x010a, 0x0044, 0x010a, + EVR_SQ, "OrganizationalRoleCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } #ifdef ENABLE_PRIVATE_TAGS , { 0x0045, 0x0004, 0x0045, 0x0004, EVR_CS, "AES", 1, 1, "PrivateTag", @@ -23058,6 +23134,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_ST, "ProcedureStepProgressDescription", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0074, 0x1007, 0x0074, 0x1007, + EVR_SQ, "ProcedureStepProgressParametersSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0074, 0x1008, 0x0074, 0x1008, EVR_SQ, "ProcedureStepCommunicationsURISequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -23575,7 +23655,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0082, 0x000c, 0x0082, 0x000c, - EVR_SQ, "StructuredContraintObservationSequence", 1, 1, "DICOM", + EVR_SQ, "StructuredConstraintObservationSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0082, 0x0010, 0x0082, 0x0010, @@ -24801,7 +24881,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x2100, 0x0140, 0x2100, 0x0140, - EVR_AE, "RETIRED_DestinationAE", 1, 1, "DICOM/retired", + EVR_AE, "DestinationAE", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x2100, 0x0160, 0x2100, 0x0160, @@ -25957,15 +26037,15 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x0088, 0x300a, 0x0088, - EVR_FL, "RETIRED_BeamDosePointDepth", 1, 1, "DICOM/retired", + EVR_FL, "BeamDosePointDepth", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x0089, 0x300a, 0x0089, - EVR_FL, "RETIRED_BeamDosePointEquivalentDepth", 1, 1, "DICOM/retired", + EVR_FL, "BeamDosePointEquivalentDepth", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x008a, 0x300a, 0x008a, - EVR_FL, "RETIRED_BeamDosePointSSD", 1, 1, "DICOM/retired", + EVR_FL, "BeamDosePointSSD", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x008b, 0x300a, 0x008b, @@ -25977,15 +26057,15 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x008d, 0x300a, 0x008d, - EVR_FL, "AverageBeamDosePointDepth", 1, 1, "DICOM", + EVR_FL, "RETIRED_AverageBeamDosePointDepth", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x008e, 0x300a, 0x008e, - EVR_FL, "AverageBeamDosePointEquivalentDepth", 1, 1, "DICOM", + EVR_FL, "RETIRED_AverageBeamDosePointEquivalentDepth", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x008f, 0x300a, 0x008f, - EVR_FL, "AverageBeamDosePointSSD", 1, 1, "DICOM", + EVR_FL, "RETIRED_AverageBeamDosePointSSD", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x0090, 0x300a, 0x0090, @@ -26000,6 +26080,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_CS, "AlternateBeamDoseType", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x300a, 0x0093, 0x300a, 0x0093, + EVR_CS, "DepthValueAveragingFlag", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x300a, 0x00a0, 0x300a, 0x00a0, EVR_IS, "NumberOfBrachyApplicationSetups", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -26732,6 +26816,22 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_DS, "BrachyAccessoryDeviceNominalTransmission", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x300a, 0x0271, 0x300a, 0x0271, + EVR_DS, "ChannelEffectiveLength", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0272, 0x300a, 0x0272, + EVR_DS, "ChannelInnerLength", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0273, 0x300a, 0x0273, + EVR_SH, "AfterloaderChannelID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0274, 0x300a, 0x0274, + EVR_DS, "SourceApplicatorTipLength", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x300a, 0x0280, 0x300a, 0x0280, EVR_SQ, "ChannelSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, diff --git a/dcmdata/libsrc/dcelem.cc b/dcmdata/libsrc/dcelem.cc index 840e6aae..b8d1272f 100644 --- a/dcmdata/libsrc/dcelem.cc +++ b/dcmdata/libsrc/dcelem.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -1955,38 +1955,115 @@ OFCondition DcmElement::createValueFromTempFile(DcmInputStreamFactory *factory, } +// the following macro makes the source code more readable and easier to maintain + +#define GET_AND_CHECK_UINT16_VALUE(tag, variable) \ + result = dataset->findAndGetUint16(tag, variable); \ + if (result == EC_TagNotFound) \ + { \ + DCMDATA_WARN("DcmElement: Mandatory element " << DcmTag(tag).getTagName() << " " << tag << " is missing"); \ + result = EC_MissingAttribute; \ + } \ + else if ((result == EC_IllegalCall) || (result == EC_IllegalParameter)) \ + { \ + DCMDATA_WARN("DcmElement: No value for mandatory element " << DcmTag(tag).getTagName() << " " << tag); \ + result = EC_MissingValue; \ + } \ + else if (result.bad()) \ + DCMDATA_WARN("DcmElement: Cannot retrieve value of element " << DcmTag(tag).getTagName() << " " << tag << ": " << result.text()); + + OFCondition DcmElement::getUncompressedFrameSize(DcmItem *dataset, Uint32 &frameSize) const { - if (dataset == NULL) return EC_IllegalCall; - Uint16 rows = 0; - Uint16 cols = 0; - Uint16 samplesPerPixel = 0; - Uint16 bitsAllocated = 0; - // retrieve values from dataset - OFCondition result = EC_Normal; - if (result.good()) result = dataset->findAndGetUint16(DCM_Columns, cols); - if (result.good()) result = dataset->findAndGetUint16(DCM_Rows, rows); - if (result.good()) result = dataset->findAndGetUint16(DCM_SamplesPerPixel, samplesPerPixel); - if (result.good()) result = dataset->findAndGetUint16(DCM_BitsAllocated, bitsAllocated); - - // compute frame size - if ((bitsAllocated % 8) == 0) - { - const Uint16 bytesAllocated = bitsAllocated / 8; - frameSize = bytesAllocated * rows * cols * samplesPerPixel; - } - else - { - /* need to split calculation in order to avoid integer overflow for large pixel data */ - const Uint32 v1 = rows * cols * samplesPerPixel; - const Uint32 v2 = (bitsAllocated / 8) * v1; - const Uint32 v3 = ((bitsAllocated % 8) * v1 + 7) / 8; -// # old code: frameSize = (bitsAllocated * rows * cols * samplesPerPixel + 7) / 8; - frameSize = v2 + v3; - } + OFCondition result = EC_IllegalParameter; + if (dataset != NULL) + { + Uint16 rows = 0; + Uint16 cols = 0; + Uint16 samplesPerPixel = 0; + Uint16 bitsAllocated = 0; + /* retrieve values from dataset (and check them for validity and plausibility) */ + GET_AND_CHECK_UINT16_VALUE(DCM_Columns, cols) + else if (cols == 0) + DCMDATA_WARN("DcmElement: Dubious value (" << cols << ") for element Columns " << DCM_Columns); + if (result.good()) + { + GET_AND_CHECK_UINT16_VALUE(DCM_Rows, rows) + else if (rows == 0) + DCMDATA_WARN("DcmElement: Dubious value (" << rows << ") for element Rows " << DCM_Rows); + } + if (result.good()) + { + GET_AND_CHECK_UINT16_VALUE(DCM_SamplesPerPixel, samplesPerPixel) + else /* result.good() */ + { + /* also need to check value of PhotometricInterpretation */ + OFString photometricInterpretation; + if (dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, photometricInterpretation).good()) + { + if (photometricInterpretation.empty()) + DCMDATA_WARN("DcmElement: No value for mandatory element PhotometricInterpretation " << DCM_PhotometricInterpretation); + else { + const OFBool isMono = (photometricInterpretation == "MONOCHROME1") || + (photometricInterpretation == "MONOCHROME2"); + const OFBool isColor1 = (photometricInterpretation == "PALETTE COLOR"); + const OFBool isColor3 = (photometricInterpretation == "RGB") || + (photometricInterpretation == "HSV" /* retired */) || + (photometricInterpretation == "YBR_FULL") || + (photometricInterpretation == "YBR_FULL_422") || + (photometricInterpretation == "YBR_PARTIAL_422" /* retired */) || + (photometricInterpretation == "YBR_PARTIAL_420") || + (photometricInterpretation == "YBR_ICT") || + (photometricInterpretation == "YBR_RCT"); + const OFBool isColor4 = (photometricInterpretation == "ARGB" /* retired */) || + (photometricInterpretation == "CMYK" /* retired */); + if (((isMono || isColor1) && (samplesPerPixel != 1)) || (isColor3 && (samplesPerPixel != 3)) || (isColor4 && (samplesPerPixel != 4))) - return result; + { + DCMDATA_WARN("DcmElement: Invalid value (" << samplesPerPixel << ") for element SamplesPerPixel " << DCM_SamplesPerPixel + << " when PhotometricInterpretation " << DCM_PhotometricInterpretation << " is " << photometricInterpretation); + result = EC_InvalidValue; + } + else if (!isMono && !isColor1 && !isColor3 && !isColor4) + DCMDATA_WARN("DcmElement: Unsupported value (" << photometricInterpretation << ") for element PhotometricInterpretation " << DCM_PhotometricInterpretation); + } + } + if (result.good() && (samplesPerPixel != 1) && (samplesPerPixel != 3)) + DCMDATA_WARN("DcmElement: Dubious value (" << samplesPerPixel << ") for element SamplesPerPixel " << DCM_SamplesPerPixel); + } + } + if (result.good()) + { + GET_AND_CHECK_UINT16_VALUE(DCM_BitsAllocated, bitsAllocated) + /* see PS3.3 Table C.7-11c: "Bits Allocated (0028,0100) shall be either 1, or a multiple of 8." */ + else if ((bitsAllocated == 0) || ((bitsAllocated > 1) && (bitsAllocated % 8 != 0))) + DCMDATA_WARN("DcmElement: Dubious value (" << bitsAllocated << ") for element BitsAllocated " << DCM_BitsAllocated); + } + /* if all checks were passed... */ + if (result.good()) + { + /* compute frame size (TODO: check for 32-bit integer overflow?) */ + if ((bitsAllocated % 8) == 0) + { + const Uint16 bytesAllocated = bitsAllocated / 8; + frameSize = bytesAllocated * rows * cols * samplesPerPixel; + } + else + { + /* need to split calculation in order to avoid integer overflow for large pixel data */ + const Uint32 v1 = rows * cols * samplesPerPixel; + const Uint32 v2 = (bitsAllocated / 8) * v1; + const Uint32 v3 = ((bitsAllocated % 8) * v1 + 7) / 8; + // # old code: frameSize = (bitsAllocated * rows * cols * samplesPerPixel + 7) / 8; + frameSize = v2 + v3; + } + } else { + /* in case of error, return a frame size of 0 */ + frameSize = 0; + } + } + return result; } @@ -2168,7 +2245,7 @@ OFCondition DcmElement::checkVM(const unsigned long vmNum, { if (vmNum != 256) result = EC_ValueMultiplicityViolated; } - else if ( (vmStr != "1-n") && (vmStr != "0-n") ) + else if ((vmStr != "1-n") && (vmStr != "0-n")) { // given value of 'vmStr' not (yet) supported result = EC_IllegalParameter; @@ -2177,6 +2254,14 @@ OFCondition DcmElement::checkVM(const unsigned long vmNum, return result; } + +OFBool DcmElement::isUniversalMatch(const OFBool normalize, + const OFBool enableWildCardMatching) +{ + OFstatic_cast(void,enableWildCardMatching); + return isEmpty(normalize); +} + OFBool DcmElement::matches(const DcmElement& candidate, const OFBool enableWildCardMatching) const { @@ -2185,6 +2270,7 @@ OFBool DcmElement::matches(const DcmElement& candidate, return OFFalse; } + OFBool DcmElement::combinationMatches(const DcmElement& keySecond, const DcmElement& candidateFirst, const DcmElement& candidateSecond) const diff --git a/dcmdata/libsrc/dcitem.cc b/dcmdata/libsrc/dcitem.cc index a357b66b..20c7abee 100644 --- a/dcmdata/libsrc/dcitem.cc +++ b/dcmdata/libsrc/dcitem.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -588,7 +588,7 @@ Uint32 DcmItem::calcElementLength(const E_TransferSyntax xfer, Uint32 itemlen = 0; DcmXfer xferSyn(xfer); /* Length of item's start header */ - Uint32 headersize = xferSyn.sizeofTagHeader(getVR()); + const Uint32 headersize = xferSyn.sizeofTagHeader(getVR()); /* Length of item's content, i.e. contained elements */ itemlen = getLength(xfer, enctype); /* Since the item's total length can exceed the maximum length of 32 bit, it is @@ -597,7 +597,7 @@ Uint32 DcmItem::calcElementLength(const E_TransferSyntax xfer, */ if ( (itemlen == DCM_UndefinedLength) || OFStandard::check32BitAddOverflow(itemlen, headersize) ) return DCM_UndefinedLength; - itemlen += xferSyn.sizeofTagHeader(getVR()); + itemlen += headersize; if (enctype == EET_UndefinedLength) // add bytes for closing item tag marker if necessary { if (OFStandard::check32BitAddOverflow(itemlen, 8)) @@ -1114,14 +1114,20 @@ OFCondition DcmItem::readTagAndLength(DcmInputStream &inStream, bytesRead += 2; valueLength = tmpValueLength; } + /* check whether value in length field is appropriate for this VR */ + const size_t vrSize = vr.getValueWidth(); + if ((vrSize > 1) && (valueLength % vrSize != 0)) + { + /* warning is only reported for standard, fixed-size VRs that require more than 1 byte per value */ + DCMDATA_WARN("DcmItem: Length of element " << newTag << " is not a multiple of " << vrSize << " (VR=" << vr.getVRName() << ")"); + } } - /* if the value in length is odd, print an error message */ - if ( (valueLength & 1) && (valueLength != DCM_UndefinedLength) ) + /* if the value in the length field is odd, print an error message */ + if ((valueLength & 1) && (valueLength != DCM_UndefinedLength)) { DCMDATA_WARN("DcmItem: Length of element " << newTag << " is odd"); } - /* if desired, handle private attributes with maximum length as VR SQ */ if (isPrivate && dcmReadImplPrivAttribMaxLengthAsSQ.get() && (valueLength == DCM_UndefinedLength)) { @@ -1145,7 +1151,7 @@ OFCondition DcmItem::readTagAndLength(DcmInputStream &inStream, /* if the next tag is the sequence delimiter item, we can adapt to the situation */ if (newTag.getXTag() == DCM_SequenceDelimitationItem) { - DCMDATA_WARN("DcmItem: Sequence delimitation occured before all bytes announced by explicit item length could be read"); + DCMDATA_WARN("DcmItem: Sequence delimitation occurred before all bytes announced by explicit item length could be read"); l_error = EC_PrematureSequDelimitationItem; /* rewind to start of sequence delimiter which is read in a regular way */ /* by DcmSequenceOfItems later (if error is ignored in DcmItem::read()) */ diff --git a/dcmdata/libsrc/dcmatch.cc b/dcmdata/libsrc/dcmatch.cc index 9a9e7e8d..e736c953 100644 --- a/dcmdata/libsrc/dcmatch.cc +++ b/dcmdata/libsrc/dcmatch.cc @@ -32,6 +32,9 @@ class DcmAttributeMatching::WildCardMatcher { public: + +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_SHADOW // constructor, remembering the end of the query and candidate strings WildCardMatcher( const char* queryDataEnd, const char* candidateDataEnd ) : queryDataEnd( queryDataEnd ) @@ -39,6 +42,7 @@ public: { } +#include DCMTK_DIAGNOSTIC_POP // the actual match function, taking two pointers to the beginning of // the query and the candidate string diff --git a/dcmdata/libsrc/dcostrmb.cc b/dcmdata/libsrc/dcostrmb.cc index 2d32e990..3d13ad09 100644 --- a/dcmdata/libsrc/dcostrmb.cc +++ b/dcmdata/libsrc/dcostrmb.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2010, OFFIS e.V. + * Copyright (C) 2002-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -32,7 +32,7 @@ DcmBufferConsumer::DcmBufferConsumer(void *buf, offile_off_t bufLen) , filled_(0) , status_(EC_Normal) { - if ((buffer_ == NULL) || (bufSize_ == 0)) status_ = EC_IllegalCall; + if (buffer_ == NULL) status_ = EC_IllegalCall; } DcmBufferConsumer::~DcmBufferConsumer() diff --git a/dcmdata/libsrc/dcpxitem.cc b/dcmdata/libsrc/dcpxitem.cc index 892390e5..b823ffa1 100644 --- a/dcmdata/libsrc/dcpxitem.cc +++ b/dcmdata/libsrc/dcpxitem.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -124,6 +124,24 @@ DcmItem *DcmPixelItem::getParentItem() // ******************************** +Uint32 DcmPixelItem::calcElementLength(const E_TransferSyntax xfer, + const E_EncodingType enctype) +{ + /* silence unused arguments warnings */ + OFstatic_cast(void, xfer); + OFstatic_cast(void, enctype); + /* get length of the pixel data */ + Uint32 valueLength = getLengthField(); + /* make sure the value did not overflow, clamp it otherwise. */ + if (OFStandard::check32BitAddOverflow(valueLength, 8)) + return OFnumeric_limits::max(); + return valueLength + 8; +} + + +// ******************************** + + OFCondition DcmPixelItem::writeTagAndLength(DcmOutputStream &outStream, const E_TransferSyntax oxfer, Uint32 &writtenBytes) const @@ -179,17 +197,27 @@ OFCondition DcmPixelItem::createOffsetTable(const DcmOffsetList &offsetList) OFListConstIterator(Uint32) first = offsetList.begin(); OFListConstIterator(Uint32) last = offsetList.end(); unsigned long idx = 0; + OFBool overflow = OFFalse; while ((first != last) && result.good()) { - // check for odd offset values, should never happen at this point - if (current & 1) + // check for 32-bit unsigned integer overflow (during previous iteration) and report on this + if (overflow) + { + DCMDATA_WARN("DcmPixelItem: offset value exceeds maximum (32-bit unsigned integer) for frame #" + << (idx + 1) << ", cannot create offset table"); + result = EC_InvalidBasicOffsetTable; + } + // check for odd offset values, should never happen at this point (if list was filled by an encoder) + else if (current & 1) { - DCMDATA_WARN("DcmPixelItem: odd frame size (" << current << ") found for frame #" + DCMDATA_WARN("DcmPixelItem: odd offset value (" << current << ") for frame #" << (idx + 1) << ", cannot create offset table"); result = EC_InvalidBasicOffsetTable; } else { + // value "current" is proven to be valid array[idx++] = current; - current += *first; + // check for 32-bit unsigned integer overflow (but report only during next iteration) + overflow = !OFStandard::safeAdd(current, *first, current); ++first; } } diff --git a/dcmdata/libsrc/dcuid.cc b/dcmdata/libsrc/dcuid.cc index b594b024..06fb7de7 100644 --- a/dcmdata/libsrc/dcuid.cc +++ b/dcmdata/libsrc/dcuid.cc @@ -27,6 +27,7 @@ // on Windows, we need Winsock2 for getting network adapter information #include #include +#include #endif #define INCLUDE_CSTDLIB @@ -78,7 +79,7 @@ END_EXTERN_C #include "dcmtk/ofstd/ofdefine.h" #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofvector.h" -#include "dcmtk/ofstd/ofnetdb.h" +#include "dcmtk/ofstd/ofsockad.h" struct UIDNameMap { const char* uid; @@ -225,6 +226,7 @@ static const UIDNameMap uidNameMap[] = { { UID_PatientRadiationDoseSRStorage, "PatientRadiationDoseSRStorage" }, { UID_PositronEmissionTomographyImageStorage, "PositronEmissionTomographyImageStorage" }, { UID_ProcedureLogStorage, "ProcedureLogStorage" }, + { UID_ProtocolApprovalStorage, "ProtocolApprovalStorage" }, { UID_PseudoColorSoftcopyPresentationStateStorage, "PseudoColorSoftcopyPresentationStateStorage" }, { UID_RadiopharmaceuticalRadiationDoseSRStorage, "RadiopharmaceuticalRadiationDoseSRStorage" }, { UID_RawDataStorage, "RawDataStorage" }, @@ -379,6 +381,11 @@ static const UIDNameMap uidNameMap[] = { { UID_MOVEDefinedProcedureProtocolInformationModel, "MOVEDefinedProcedureProtocolInformationModel" }, { UID_GETDefinedProcedureProtocolInformationModel, "GETDefinedProcedureProtocolInformationModel" }, + // Protocol Approval Query/Retrieve + { UID_FINDProtocolApprovalInformationModel, "FINDProtocolApprovalInformationModel" }, + { UID_MOVEProtocolApprovalInformationModel, "MOVEProtocolApprovalInformationModel" }, + { UID_GETProtocolApprovalInformationModel, "GETProtocolApprovalInformationModel" }, + // Print { UID_BasicAnnotationBoxSOPClass, "BasicAnnotationBoxSOPClass" }, { UID_BasicColorImageBoxSOPClass, "BasicColorImageBoxSOPClass" }, @@ -743,6 +750,7 @@ const char* dcmNonPatientStorageSOPClassUIDs[] = { UID_HangingProtocolStorage, UID_ImplantAssemblyTemplateStorage, UID_ImplantTemplateGroupStorage, + UID_ProtocolApprovalStorage, // end marker (important!) NULL }; @@ -893,6 +901,7 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = { // UID_HangingProtocolStorage, // UID_ImplantAssemblyTemplateStorage, // UID_ImplantTemplateGroupStorage, +// UID_ProtocolApprovalStorage, // retired UID_RETIRED_HardcopyColorImageStorage, UID_RETIRED_HardcopyGrayscaleImageStorage, @@ -1210,6 +1219,7 @@ static const DcmModalityTable modalities[] = { { UID_PatientRadiationDoseSRStorage, "SRq", 4096 }, { UID_PositronEmissionTomographyImageStorage, "PI", 512 * 512 * 2 }, { UID_ProcedureLogStorage, "SRp", 4096 }, + { UID_ProtocolApprovalStorage, "PA", 4096 }, { UID_PseudoColorSoftcopyPresentationStateStorage, "PSp", 4096 }, { UID_RadiopharmaceuticalRadiationDoseSRStorage, "SRr", 4096 }, { UID_RawDataStorage, "RAW", 512 * 512 * 256 }, @@ -1504,31 +1514,41 @@ static long gethostid(void) #endif { long result = 0; -#if (defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME)) || defined(HAVE_WINDOWS_H) +#if defined(HAVE_GETHOSTNAME) || defined(HAVE_WINDOWS_H) char name[1024]; - char **p = NULL; - struct in_addr in; - - OFStandard::initializeNetwork(); /* - ** Define the hostid to be the system's main TCP/IP address. + ** Define the hostid to be the system's main IP address. ** This is not perfect but it is better than nothing (i.e. using zero) */ + OFStandard::initializeNetwork(); if (gethostname(name, 1024) == 0) { - if (OFStandard::OFHostent hent = OFStandard::getHostByName(name)) + struct sockaddr_in *sin = NULL; + struct sockaddr_in6 *sin6 = NULL; + long *lp = NULL; + OFSockAddr sa; + OFStandard::getAddressByHostname(name, sa); + switch (sa.getFamily()) { - if (!hent.h_addr_list.empty()) - { - memcpy(&in.s_addr, hent.h_addr_list.front().c_str(), sizeof(in.s_addr)); - result = OFstatic_cast(long, in.s_addr); - } + case AF_INET: + sin = sa. getSockaddr_in(); + result = OFstatic_cast(long, sin->sin_addr.s_addr); + break; + case AF_INET6: + sin6 = sa. getSockaddr_in6(); + // interpret the first four bytes of the IPv6 address as a long + lp = OFreinterpret_cast(long *, &sin6->sin6_addr); + result = *lp; + break; + default: + // unknown protocol family. Do nothing. + break; } } OFStandard::shutdownNetwork(); -#endif /* defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) */ +#endif /* defined(HAVE_GETHOSTNAME) */ /* on Windows systems determine some system specific information (e.g. MAC address) */ #ifdef HAVE_WINDOWS_H OFCRC32 crc; diff --git a/dcmdata/libsrc/dcvrae.cc b/dcmdata/libsrc/dcvrae.cc index 47822406..41497aca 100644 --- a/dcmdata/libsrc/dcvrae.cc +++ b/dcmdata/libsrc/dcvrae.cc @@ -116,6 +116,28 @@ OFCondition DcmApplicationEntity::checkStringValue(const OFString &value, } +OFBool DcmApplicationEntity::isUniversalMatch(const OFBool normalize, + const OFBool enableWildCardMatching) +{ + if(!isEmpty(normalize)) + { + if(enableWildCardMatching) + { + OFString value; + for(unsigned long valNo = 0; valNo < getVM(); ++valNo) + { + getOFString(value, valNo, normalize); + if(value.find_first_not_of( '*' ) != OFString_npos) + return OFFalse; + } + } + else + return OFFalse; + } + return OFTrue; +} + + OFBool DcmApplicationEntity::matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching) const diff --git a/dcmdata/libsrc/dcvrat.cc b/dcmdata/libsrc/dcvrat.cc index 8efb5d6e..c5c7437c 100644 --- a/dcmdata/libsrc/dcvrat.cc +++ b/dcmdata/libsrc/dcvrat.cc @@ -444,3 +444,28 @@ OFCondition DcmAttributeTag::checkStringValue(const OFString &value, { return DcmElement::checkVM(DcmElement::determineVM(value.c_str(), value.length()), vm); } + + +// ******************************** + + +OFBool DcmAttributeTag::isUniversalMatch(const OFBool normalize, + const OFBool enableWildCardMatching) +{ + if(!isEmpty(normalize)) + { + if(enableWildCardMatching) + { + OFString value; + for(unsigned long valNo = 0; valNo < getVM(); ++valNo) + { + getOFString(value, valNo, normalize); + if(value.find_first_not_of( '*' ) != OFString_npos) + return OFFalse; + } + } + else + return OFFalse; + } + return OFTrue; +} diff --git a/dcmdata/libsrc/dcvrcs.cc b/dcmdata/libsrc/dcvrcs.cc index 14c4a129..f3db927d 100644 --- a/dcmdata/libsrc/dcvrcs.cc +++ b/dcmdata/libsrc/dcvrcs.cc @@ -154,3 +154,25 @@ OFBool DcmCodeString::matches(const OFString& key, else return DcmByteString::matches(key, candidate, OFFalse); } + + +OFBool DcmCodeString::isUniversalMatch(const OFBool normalize, + const OFBool enableWildCardMatching) +{ + if(!isEmpty(normalize)) + { + if(enableWildCardMatching) + { + OFString value; + for(unsigned long valNo = 0; valNo < getVM(); ++valNo) + { + getOFString(value, valNo, normalize); + if(value.find_first_not_of( '*' ) != OFString_npos) + return OFFalse; + } + } + else + return OFFalse; + } + return OFTrue; +} diff --git a/dcmdata/libsrc/dcvrfd.cc b/dcmdata/libsrc/dcvrfd.cc index 79b49a95..0cfc51d3 100644 --- a/dcmdata/libsrc/dcvrfd.cc +++ b/dcmdata/libsrc/dcvrfd.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,7 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/dcmdata/dcvrfd.h" @@ -166,43 +165,51 @@ void DcmFloatingPointDouble::print(STD_NAMESPACE ostream&out, errorFlag = getFloat64Array(doubleVals); if (doubleVals != NULL) { - const unsigned long count = getLengthField() / OFstatic_cast(unsigned long, sizeof(Float64)) /* do not use getVM()! */; - const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? - DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; - unsigned long printedLength = 0; - unsigned long newLength = 0; - char buffer[64]; - /* print line start with tag and VR */ - printInfoLineStart(out, flags, level); - /* print multiple values */ - for (unsigned int i = 0; i < count; i++, doubleVals++) + /* do not simply use getVM() because derived classes might always return 1 */ + const unsigned long count = getLengthField() / OFstatic_cast(unsigned long, sizeof(Float64)); + /* double-check length field for valid value */ + if (count > 0) { - /* check whether first value is printed (omit delimiter) */ - if (i == 0) - OFStandard::ftoa(buffer, sizeof(buffer), *doubleVals, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */); - else - { - buffer[0] = '\\'; - OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *doubleVals, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */); - } - /* check whether current value sticks to the length limit */ - newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); - if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) + const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? + DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; + unsigned long printedLength = 0; + unsigned long newLength = 0; + char buffer[64]; + /* print line start with tag and VR */ + printInfoLineStart(out, flags, level); + /* print multiple values */ + for (unsigned int i = 0; i < count; i++, doubleVals++) { - out << buffer; - printedLength = newLength; - } else { - /* check whether output has been truncated */ - if (i + 1 < count) + /* check whether first value is printed (omit delimiter) */ + if (i == 0) + OFStandard::ftoa(buffer, sizeof(buffer), *doubleVals, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */); + else + { + buffer[0] = '\\'; + OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *doubleVals, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */); + } + /* check whether current value sticks to the length limit */ + newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); + if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) { - out << "..."; - printedLength += 3; + out << buffer; + printedLength = newLength; + } else { + /* check whether output has been truncated */ + if (i + 1 < count) + { + out << "..."; + printedLength += 3; + } + break; } - break; } + /* print line end with length, VM and tag name */ + printInfoLineEnd(out, flags, printedLength); + } else { + /* count can be zero if we have an invalid element with less than eight bytes length */ + printInfoLine(out, flags, level, "(invalid value)"); } - /* print line end with length, VM and tag name */ - printInfoLineEnd(out, flags, printedLength); } else printInfoLine(out, flags, level, "(no value available)" ); } else @@ -224,7 +231,8 @@ OFCondition DcmFloatingPointDouble::getFloat64(Float64 &doubleVal, { if (doubleValues == NULL) errorFlag = EC_IllegalCall; - else if (pos >= getVM()) + /* do not simply use getVM() because derived classes might always return 1 */ + else if (pos >= getLengthField() / sizeof(Float64)) errorFlag = EC_IllegalParameter; else doubleVal = doubleValues[pos]; diff --git a/dcmdata/libsrc/dcvrfl.cc b/dcmdata/libsrc/dcvrfl.cc index 9c137d69..c62086ef 100644 --- a/dcmdata/libsrc/dcvrfl.cc +++ b/dcmdata/libsrc/dcvrfl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,7 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/dcmdata/dcvrfl.h" @@ -33,6 +32,7 @@ // ******************************** + DcmFloatingPointSingle::DcmFloatingPointSingle(const DcmTag &tag) : DcmElement(tag, 0) { @@ -167,43 +167,51 @@ void DcmFloatingPointSingle::print(STD_NAMESPACE ostream&out, errorFlag = getFloat32Array(floatVals); if (floatVals != NULL) { - const unsigned long count = getLengthField() / OFstatic_cast(unsigned long, sizeof(Float32)) /* do not use getVM()! */; - const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? - DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; - unsigned long printedLength = 0; - unsigned long newLength = 0; - char buffer[64]; - /* print line start with tag and VR */ - printInfoLineStart(out, flags, level); - /* print multiple values */ - for (unsigned int i = 0; i < count; i++, floatVals++) + /* do not simply use getVM() because derived classes might always return 1 */ + const unsigned long count = getLengthField() / OFstatic_cast(unsigned long, sizeof(Float32)); + /* double-check length field for valid value */ + if (count > 0) { - /* check whether first value is printed (omit delimiter) */ - if (i == 0) - OFStandard::ftoa(buffer, sizeof(buffer), *floatVals, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); - else - { - buffer[0] = '\\'; - OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *floatVals, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); - } - /* check whether current value sticks to the length limit */ - newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); - if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) + const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? + DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; + unsigned long printedLength = 0; + unsigned long newLength = 0; + char buffer[64]; + /* print line start with tag and VR */ + printInfoLineStart(out, flags, level); + /* print multiple values */ + for (unsigned int i = 0; i < count; i++, floatVals++) { - out << buffer; - printedLength = newLength; - } else { - /* check whether output has been truncated */ - if (i + 1 < count) + /* check whether first value is printed (omit delimiter) */ + if (i == 0) + OFStandard::ftoa(buffer, sizeof(buffer), *floatVals, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + else + { + buffer[0] = '\\'; + OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *floatVals, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + } + /* check whether current value sticks to the length limit */ + newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); + if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) { - out << "..."; - printedLength += 3; + out << buffer; + printedLength = newLength; + } else { + /* check whether output has been truncated */ + if (i + 1 < count) + { + out << "..."; + printedLength += 3; + } + break; } - break; } + /* print line end with length, VM and tag name */ + printInfoLineEnd(out, flags, printedLength); + } else { + /* count can be zero if we have an invalid element with less than four bytes length */ + printInfoLine(out, flags, level, "(invalid value)"); } - /* print line end with length, VM and tag name */ - printInfoLineEnd(out, flags, printedLength); } else printInfoLine(out, flags, level, "(no value available)" ); } else @@ -225,7 +233,8 @@ OFCondition DcmFloatingPointSingle::getFloat32(Float32 &floatVal, { if (floatValues == NULL) errorFlag = EC_IllegalCall; - else if (pos >= getLengthField() / sizeof(Float32) /* do not use getVM()! */) + /* do not simply use getVM() because derived classes might always return 1 */ + else if (pos >= getLengthField() / sizeof(Float32)) errorFlag = EC_IllegalParameter; else floatVal = floatValues[pos]; diff --git a/dcmdata/libsrc/dcvrobow.cc b/dcmdata/libsrc/dcvrobow.cc index 6f0bc315..b9ed6b2b 100644 --- a/dcmdata/libsrc/dcvrobow.cc +++ b/dcmdata/libsrc/dcvrobow.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -173,43 +173,50 @@ void DcmOtherByteOtherWord::print(STD_NAMESPACE ostream&out, /* check data */ if ((wordValues != NULL) || (byteValues != NULL)) { - /* determine number of values to be printed */ - const unsigned int vrSize = (evr == EVR_OW || evr == EVR_lt) ? 4 : 2; const unsigned long count = (evr == EVR_OW || evr == EVR_lt) ? (getLengthField() / 2) : getLengthField(); - unsigned long expectedLength = count * (vrSize + 1) - 1; - const unsigned long printCount = - ((expectedLength > DCM_OptPrintLineLength) && (flags & DCMTypes::PF_shortenLongTagValues)) ? - (DCM_OptPrintLineLength - 3 /* for "..." */ + 1 /* for last "\" */) / (vrSize + 1) : count; - unsigned long printedLength = printCount * (vrSize + 1) - 1; - /* print line start with tag and VR */ - printInfoLineStart(out, flags, level); - /* print multiple values */ - if (printCount > 0) + /* double-check length field for valid value */ + if (count > 0) { - out << STD_NAMESPACE hex << STD_NAMESPACE setfill('0'); - if (evr == EVR_OW || evr == EVR_lt) + /* determine number of values to be printed */ + const unsigned int vrSize = (evr == EVR_OW || evr == EVR_lt) ? 4 : 2; + unsigned long expectedLength = count * (vrSize + 1) - 1; + const unsigned long printCount = + ((expectedLength > DCM_OptPrintLineLength) && (flags & DCMTypes::PF_shortenLongTagValues)) ? + (DCM_OptPrintLineLength - 3 /* for "..." */ + 1 /* for last "\" */) / (vrSize + 1) : count; + unsigned long printedLength = printCount * (vrSize + 1) - 1; + /* print line start with tag and VR */ + printInfoLineStart(out, flags, level); + /* print multiple values */ + if (printCount > 0) { - /* print word values in hex mode */ - out << STD_NAMESPACE setw(vrSize) << (*(wordValues++)); - for (unsigned long i = 1; i < printCount; i++) - out << "\\" << STD_NAMESPACE setw(vrSize) << (*(wordValues++)); - } else { - /* print byte values in hex mode */ - out << STD_NAMESPACE setw(vrSize) << OFstatic_cast(int, *(byteValues++)); - for (unsigned long i = 1; i < printCount; i++) - out << "\\" << STD_NAMESPACE setw(vrSize) << OFstatic_cast(int, *(byteValues++)); + out << STD_NAMESPACE hex << STD_NAMESPACE setfill('0'); + if (evr == EVR_OW || evr == EVR_lt) + { + /* print word values in hex mode */ + out << STD_NAMESPACE setw(vrSize) << (*(wordValues++)); + for (unsigned long i = 1; i < printCount; i++) + out << "\\" << STD_NAMESPACE setw(vrSize) << (*(wordValues++)); + } else { + /* print byte values in hex mode */ + out << STD_NAMESPACE setw(vrSize) << OFstatic_cast(int, *(byteValues++)); + for (unsigned long i = 1; i < printCount; i++) + out << "\\" << STD_NAMESPACE setw(vrSize) << OFstatic_cast(int, *(byteValues++)); + } + /* reset i/o manipulators */ + out << STD_NAMESPACE dec << STD_NAMESPACE setfill(' '); } - /* reset i/o manipulators */ - out << STD_NAMESPACE dec << STD_NAMESPACE setfill(' '); - } - /* print trailing "..." if data has been truncated */ - if (printCount < count) - { - out << "..."; - printedLength += 3; + /* print trailing "..." if data has been truncated */ + if (printCount < count) + { + out << "..."; + printedLength += 3; + } + /* print line end with length, VM and tag name */ + printInfoLineEnd(out, flags, printedLength); + } else { + /* count can be zero if we have an invalid OW element with less than two bytes length */ + printInfoLine(out, flags, level, "(invalid value)"); } - /* print line end with length, VM and tag name */ - printInfoLineEnd(out, flags, printedLength); } else printInfoLine(out, flags, level, "(no value available)"); } else @@ -775,13 +782,17 @@ OFCondition DcmOtherByteOtherWord::writeXML(STD_NAMESPACE ostream &out, if (getUint16Array(wordValues).good() && (wordValues != NULL)) { const unsigned long count = getLengthField() / OFstatic_cast(unsigned long, sizeof(Uint16)); - out << STD_NAMESPACE hex << STD_NAMESPACE setfill('0'); - /* print word values in hex mode */ - out << STD_NAMESPACE setw(4) << (*(wordValues++)); - for (unsigned long i = 1; i < count; i++) - out << "\\" << STD_NAMESPACE setw(4) << (*(wordValues++)); - /* reset i/o manipulators */ - out << STD_NAMESPACE dec << STD_NAMESPACE setfill(' '); + /* count can be zero if we have an invalid element with less than two bytes length */ + if (count > 0) + { + out << STD_NAMESPACE hex << STD_NAMESPACE setfill('0'); + /* print word values in hex mode */ + out << STD_NAMESPACE setw(4) << (*(wordValues++)); + for (unsigned long i = 1; i < count; i++) + out << "\\" << STD_NAMESPACE setw(4) << (*(wordValues++)); + /* reset i/o manipulators */ + out << STD_NAMESPACE dec << STD_NAMESPACE setfill(' '); + } } } else { /* get and check 8 bit data */ diff --git a/dcmdata/libsrc/dcvrod.cc b/dcmdata/libsrc/dcvrod.cc index 8a409146..94ed168b 100644 --- a/dcmdata/libsrc/dcvrod.cc +++ b/dcmdata/libsrc/dcvrod.cc @@ -133,16 +133,20 @@ OFCondition DcmOtherDouble::writeXML(STD_NAMESPACE ostream &out, /* get and check 64 bit float data */ if (getFloat64Array(floatValues).good() && (floatValues != NULL)) { - /* increase default precision - see DcmFloatingPointDouble::print() */ - const STD_NAMESPACE streamsize oldPrecision = out.precision(17); /* we cannot use getVM() since it always returns 1 */ const size_t count = getLengthField() / sizeof(Float64); - /* print float values with separators */ - out << (*(floatValues++)); - for (unsigned long i = 1; i < count; i++) - out << "\\" << (*(floatValues++)); - /* reset i/o manipulators */ - out.precision(oldPrecision); + /* count can be zero if we have an invalid element with less than eight bytes length */ + if (count > 0) + { + /* increase default precision - see DcmFloatingPointDouble::print() */ + const STD_NAMESPACE streamsize oldPrecision = out.precision(17); + /* print float values with separators */ + out << (*(floatValues++)); + for (unsigned long i = 1; i < count; i++) + out << "\\" << (*(floatValues++)); + /* reset i/o manipulators */ + out.precision(oldPrecision); + } } } } diff --git a/dcmdata/libsrc/dcvrof.cc b/dcmdata/libsrc/dcvrof.cc index 307660b5..a9d128db 100644 --- a/dcmdata/libsrc/dcvrof.cc +++ b/dcmdata/libsrc/dcvrof.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2016, OFFIS e.V. + * Copyright (C) 2002-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -133,16 +133,20 @@ OFCondition DcmOtherFloat::writeXML(STD_NAMESPACE ostream &out, /* get and check 32 bit float data */ if (getFloat32Array(floatValues).good() && (floatValues != NULL)) { - /* increase default precision - see DcmFloatingPointSingle::print() */ - const STD_NAMESPACE streamsize oldPrecision = out.precision(8); /* we cannot use getVM() since it always returns 1 */ const size_t count = getLengthField() / sizeof(Float32); - /* print float values with separators */ - out << (*(floatValues++)); - for (unsigned long i = 1; i < count; i++) - out << "\\" << (*(floatValues++)); - /* reset i/o manipulators */ - out.precision(oldPrecision); + /* count can be zero if we have an invalid element with less than four bytes length */ + if (count > 0) + { + /* increase default precision - see DcmFloatingPointSingle::print() */ + const STD_NAMESPACE streamsize oldPrecision = out.precision(8); + /* print float values with separators */ + out << (*(floatValues++)); + for (unsigned long i = 1; i < count; i++) + out << "\\" << (*(floatValues++)); + /* reset i/o manipulators */ + out.precision(oldPrecision); + } } } } diff --git a/dcmdata/libsrc/dcvrol.cc b/dcmdata/libsrc/dcvrol.cc index 40d002bb..f25b6060 100644 --- a/dcmdata/libsrc/dcvrol.cc +++ b/dcmdata/libsrc/dcvrol.cc @@ -141,10 +141,14 @@ OFCondition DcmOtherLong::writeXML(STD_NAMESPACE ostream &out, { /* we cannot use getVM() since it always returns 1 */ const size_t count = getLengthField() / sizeof(Uint32); - /* print unsigned long values in hex mode */ - out << (*(uintVals++)); - for (unsigned long i = 1; i < count; i++) - out << "\\" << (*(uintVals++)); + /* count can be zero if we have an invalid element with less than four bytes length */ + if (count > 0) + { + /* print unsigned long values in hex mode */ + out << (*(uintVals++)); + for (unsigned long i = 1; i < count; i++) + out << "\\" << (*(uintVals++)); + } } } } diff --git a/dcmdata/libsrc/dcvrsl.cc b/dcmdata/libsrc/dcvrsl.cc index 3d8e2c1e..a1400b09 100644 --- a/dcmdata/libsrc/dcvrsl.cc +++ b/dcmdata/libsrc/dcvrsl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,6 +21,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcvrsl.h" @@ -31,6 +32,7 @@ // ******************************** + DcmSignedLong::DcmSignedLong(const DcmTag &tag) : DcmElement(tag, 0) { @@ -166,46 +168,53 @@ void DcmSignedLong::print(STD_NAMESPACE ostream&out, if (sintVals != NULL) { const unsigned long count = getVM(); - const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? - DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; - unsigned long printedLength = 0; - unsigned long newLength = 0; - char buffer[32]; - /* print line start with tag and VR */ - printInfoLineStart(out, flags, level); - /* print multiple values */ - for (unsigned int i = 0; i < count; i++, sintVals++) + /* double-check length field for valid value */ + if (count > 0) { - /* check whether first value is printed (omit delimiter) */ + const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? + DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; + unsigned long printedLength = 0; + unsigned long newLength = 0; + char buffer[32]; + /* print line start with tag and VR */ + printInfoLineStart(out, flags, level); + /* print multiple values */ + for (unsigned int i = 0; i < count; i++, sintVals++) + { + /* check whether first value is printed (omit delimiter) */ #if SIZEOF_LONG == 8 - if (i == 0) - sprintf(buffer, "%d", *sintVals); - else - sprintf(buffer, "\\%d", *sintVals); + if (i == 0) + sprintf(buffer, "%d", *sintVals); + else + sprintf(buffer, "\\%d", *sintVals); #else - if (i == 0) - sprintf(buffer, "%ld", *sintVals); - else - sprintf(buffer, "\\%ld", *sintVals); + if (i == 0) + sprintf(buffer, "%ld", *sintVals); + else + sprintf(buffer, "\\%ld", *sintVals); #endif - /* check whether current value sticks to the length limit */ - newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); - if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) - { - out << buffer; - printedLength = newLength; - } else { - /* check whether output has been truncated */ - if (i + 1 < count) + /* check whether current value sticks to the length limit */ + newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); + if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) { - out << "..."; - printedLength += 3; + out << buffer; + printedLength = newLength; + } else { + /* check whether output has been truncated */ + if (i + 1 < count) + { + out << "..."; + printedLength += 3; + } + break; } - break; } + /* print line end with length, VM and tag name */ + printInfoLineEnd(out, flags, printedLength); + } else { + /* count can be zero if we have an invalid element with less than four bytes length */ + printInfoLine(out, flags, level, "(invalid value)"); } - /* print line end with length, VM and tag name */ - printInfoLineEnd(out, flags, printedLength); } else printInfoLine(out, flags, level, "(no value available)"); } else diff --git a/dcmdata/libsrc/dcvrss.cc b/dcmdata/libsrc/dcvrss.cc index 918a5409..585dd6bf 100644 --- a/dcmdata/libsrc/dcvrss.cc +++ b/dcmdata/libsrc/dcvrss.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,6 +21,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcvrss.h" @@ -31,6 +32,7 @@ // ******************************** + DcmSignedShort::DcmSignedShort(const DcmTag &tag) : DcmElement(tag, 0) { @@ -166,39 +168,46 @@ void DcmSignedShort::print(STD_NAMESPACE ostream&out, if (sintVals != NULL) { const unsigned long count = getVM(); - const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? - DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; - unsigned long printedLength = 0; - unsigned long newLength = 0; - char buffer[32]; - /* print line start with tag and VR */ - printInfoLineStart(out, flags, level); - /* print multiple values */ - for (unsigned int i = 0; i < count; i++, sintVals++) + /* double-check length field for valid value */ + if (count > 0) { - /* check whether first value is printed (omit delimiter) */ - if (i == 0) - sprintf(buffer, "%hd", *sintVals); - else - sprintf(buffer, "\\%hd", *sintVals); - /* check whether current value sticks to the length limit */ - newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); - if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) + const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? + DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; + unsigned long printedLength = 0; + unsigned long newLength = 0; + char buffer[32]; + /* print line start with tag and VR */ + printInfoLineStart(out, flags, level); + /* print multiple values */ + for (unsigned int i = 0; i < count; i++, sintVals++) { - out << buffer; - printedLength = newLength; - } else { - /* check whether output has been truncated */ - if (i + 1 < count) + /* check whether first value is printed (omit delimiter) */ + if (i == 0) + sprintf(buffer, "%hd", *sintVals); + else + sprintf(buffer, "\\%hd", *sintVals); + /* check whether current value sticks to the length limit */ + newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); + if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) { - out << "..."; - printedLength += 3; + out << buffer; + printedLength = newLength; + } else { + /* check whether output has been truncated */ + if (i + 1 < count) + { + out << "..."; + printedLength += 3; + } + break; } - break; } + /* print line end with length, VM and tag name */ + printInfoLineEnd(out, flags, printedLength); + } else { + /* count can be zero if we have an invalid element with less than two bytes length */ + printInfoLine(out, flags, level, "(invalid value)"); } - /* print line end with length, VM and tag name */ - printInfoLineEnd(out, flags, printedLength); } else printInfoLine(out, flags, level, "(no value available)"); } else diff --git a/dcmdata/libsrc/dcvrul.cc b/dcmdata/libsrc/dcvrul.cc index 3d90a636..ae7480c2 100644 --- a/dcmdata/libsrc/dcvrul.cc +++ b/dcmdata/libsrc/dcvrul.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -165,46 +165,54 @@ void DcmUnsignedLong::print(STD_NAMESPACE ostream&out, errorFlag = getUint32Array(uintVals); if (uintVals != NULL) { - const unsigned long count = getLengthField() / OFstatic_cast(unsigned long, sizeof(Uint32)) /* do not use getVM()! */; - const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? - DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; - unsigned long printedLength = 0; - unsigned long newLength = 0; - char buffer[32]; - /* print line start with tag and VR */ - printInfoLineStart(out, flags, level); - /* print multiple values */ - for (unsigned int i = 0; i < count; i++, uintVals++) + /* do not simply use getVM() because derived classes might always return 1 */ + const unsigned long count = getLengthField() / OFstatic_cast(unsigned long, sizeof(Uint32)); + /* double-check length field for valid value */ + if (count > 0) { - /* check whether first value is printed (omit delimiter) */ - if (i == 0) + const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? + DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; + unsigned long printedLength = 0; + unsigned long newLength = 0; + char buffer[32]; + /* print line start with tag and VR */ + printInfoLineStart(out, flags, level); + /* print multiple values */ + for (unsigned int i = 0; i < count; i++, uintVals++) + { + /* check whether first value is printed (omit delimiter) */ + if (i == 0) #if SIZEOF_LONG == 8 - sprintf(buffer, "%u", *uintVals); - else - sprintf(buffer, "\\%u", *uintVals); + sprintf(buffer, "%u", *uintVals); + else + sprintf(buffer, "\\%u", *uintVals); #else - sprintf(buffer, "%lu", *uintVals); - else - sprintf(buffer, "\\%lu", *uintVals); + sprintf(buffer, "%lu", *uintVals); + else + sprintf(buffer, "\\%lu", *uintVals); #endif - /* check whether current value sticks to the length limit */ - newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); - if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) - { - out << buffer; - printedLength = newLength; - } else { - /* check whether output has been truncated */ - if (i + 1 < count) + /* check whether current value sticks to the length limit */ + newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); + if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) { - out << "..."; - printedLength += 3; + out << buffer; + printedLength = newLength; + } else { + /* check whether output has been truncated */ + if (i + 1 < count) + { + out << "..."; + printedLength += 3; + } + break; } - break; } + /* print line end with length, VM and tag name */ + printInfoLineEnd(out, flags, printedLength); + } else { + /* count can be zero if we have an invalid element with less than four bytes length */ + printInfoLine(out, flags, level, "(invalid value)"); } - /* print line end with length, VM and tag name */ - printInfoLineEnd(out, flags, printedLength); } else printInfoLine(out, flags, level, "(no value available)"); } else @@ -226,7 +234,8 @@ OFCondition DcmUnsignedLong::getUint32(Uint32 &uintVal, { if (uintValues == NULL) errorFlag = EC_IllegalCall; - else if (pos >= getVM()) + /* do not simply use getVM() because derived classes might always return 1 */ + else if (pos >= getLengthField() / sizeof(Uint32)) errorFlag = EC_IllegalParameter; else uintVal = uintValues[pos]; diff --git a/dcmdata/libsrc/dcvrur.cc b/dcmdata/libsrc/dcvrur.cc index 85b920da..0efbed25 100644 --- a/dcmdata/libsrc/dcvrur.cc +++ b/dcmdata/libsrc/dcvrur.cc @@ -135,3 +135,27 @@ OFBool DcmUniversalResourceIdentifierOrLocator::matches(const OFString& key, else return DcmByteString::matches(key, candidate, OFFalse); } + + +OFBool DcmUniversalResourceIdentifierOrLocator::isUniversalMatch(const OFBool normalize, + const OFBool enableWildCardMatching) +{ + if(!isEmpty(normalize)) + { + if(enableWildCardMatching) + { + OFString value; + if(!normalize && getVM() > 1) + return OFFalse; + for(unsigned long valNo = 0; valNo < getVM(); ++valNo) + { + getOFString(value, valNo, normalize); + if(value.find_first_not_of( '*' ) != OFString_npos) + return OFFalse; + } + } + else + return OFFalse; + } + return OFTrue; +} diff --git a/dcmdata/libsrc/dcvrus.cc b/dcmdata/libsrc/dcvrus.cc index 040f3d24..cbc37ffb 100644 --- a/dcmdata/libsrc/dcvrus.cc +++ b/dcmdata/libsrc/dcvrus.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -165,39 +165,46 @@ void DcmUnsignedShort::print(STD_NAMESPACE ostream&out, if (uintVals != NULL) { const unsigned long count = getVM(); - const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? - DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; - unsigned long printedLength = 0; - unsigned long newLength = 0; - char buffer[32]; - /* print line start with tag and VR */ - printInfoLineStart(out, flags, level); - /* print multiple values */ - for (unsigned int i = 0; i < count; i++, uintVals++) + /* double-check length field for valid value */ + if (count > 0) { - /* check whether first value is printed (omit delimiter) */ - if (i == 0) - sprintf(buffer, "%hu", *uintVals); - else - sprintf(buffer, "\\%hu", *uintVals); - /* check whether current value sticks to the length limit */ - newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); - if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) + const unsigned long maxLength = (flags & DCMTypes::PF_shortenLongTagValues) ? + DCM_OptPrintLineLength : OFstatic_cast(unsigned long, -1) /*unlimited*/; + unsigned long printedLength = 0; + unsigned long newLength = 0; + char buffer[32]; + /* print line start with tag and VR */ + printInfoLineStart(out, flags, level); + /* print multiple values */ + for (unsigned int i = 0; i < count; i++, uintVals++) { - out << buffer; - printedLength = newLength; - } else { - /* check whether output has been truncated */ - if (i + 1 < count) + /* check whether first value is printed (omit delimiter) */ + if (i == 0) + sprintf(buffer, "%hu", *uintVals); + else + sprintf(buffer, "\\%hu", *uintVals); + /* check whether current value sticks to the length limit */ + newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); + if ((newLength <= maxLength) && ((i + 1 == count) || (newLength + 3 <= maxLength))) { - out << "..."; - printedLength += 3; + out << buffer; + printedLength = newLength; + } else { + /* check whether output has been truncated */ + if (i + 1 < count) + { + out << "..."; + printedLength += 3; + } + break; } - break; } + /* print line end with length, VM and tag name */ + printInfoLineEnd(out, flags, printedLength); + } else { + /* count can be zero if we have an invalid element with less than two bytes length */ + printInfoLine(out, flags, level, "(invalid value)"); } - /* print line end with length, VM and tag name */ - printInfoLineEnd(out, flags, printedLength); } else printInfoLine(out, flags, level, "(no value available)"); } else diff --git a/dcmdata/tests/tparser.cc b/dcmdata/tests/tparser.cc index 67d8b0be..cb8f93c3 100644 --- a/dcmdata/tests/tparser.cc +++ b/dcmdata/tests/tparser.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2014, OFFIS e.V. + * Copyright (C) 2011-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -240,7 +240,7 @@ OFTEST(dcmdata_parser_explicitItemLengthTooLarge) cond = readDataset(dset, data, sizeof(data), EXS_LittleEndianImplicit); if (cond != EC_PrematureSequDelimitationItem) { - OFCHECK_FAIL("Parsing should have failed with 'Sequence Delimitation Item occured before Item was completely read', but got: " << cond.text()); + OFCHECK_FAIL("Parsing should have failed with 'Sequence Delimitation Item occurred before Item was completely read', but got: " << cond.text()); } // This should ignore the error during parsing diff --git a/dcmdata/tests/tpread.cc b/dcmdata/tests/tpread.cc index 4548a035..3ece6577 100644 --- a/dcmdata/tests/tpread.cc +++ b/dcmdata/tests/tpread.cc @@ -157,7 +157,7 @@ static OFCondition sequentialOverlappingRead(DcmElement *delem, DcmFileCache *dc } offset += bytes_to_read; - if (offset > 4) offset -= (rand() % 4); // let the read operations overlap by 0-3 bytes + if ((offset > 4) && (offset < BUFSIZE)) offset -= (rand() % 4); // let the read operations overlap by 0-3 bytes } delete[] target; return EC_Normal; diff --git a/dcmfg/include/CMakeLists.txt b/dcmfg/include/CMakeLists.txt index 5227b72e..a8480bd5 100644 --- a/dcmfg/include/CMakeLists.txt +++ b/dcmfg/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmfg DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmfg DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h b/dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h deleted file mode 100644 index 5778ccd0..00000000 --- a/dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * - * Copyright (C) 2016, Open Connections GmbH - * All rights reserved. See COPYRIGHT file for details. - * - * This software and supporting documentation are maintained by - * - * OFFIS e.V. - * R&D Division Health - * Escherweg 2 - * D-26121 Oldenburg, Germany - * - * - * Module: dcmfg - * - * Author: Jan Schlamelcher - * - * Purpose: Class for managing the Identity Pixel Value Transformation Functional Group - * - */ - -#ifndef FGIDENTPIXELTRANSFORM_H -#define FGIDENTPIXELTRANSFORM_H - -#include "dcmtk/config/osconfig.h" -#include "dcmtk/dcmdata/dcitem.h" -#include "dcmtk/dcmfg/fgbase.h" -#include "dcmtk/dcmdata/dcvrds.h" -#include "dcmtk/dcmdata/dcvrlo.h" - - -/** Class representing the Identity Pixel Value Transformation Functional Group Macro. - */ -class DCMTK_DCMFG_EXPORT FGIdentityPixelValueTransformation : public FGBase -{ -public: - - /** Constructor, creates Identity Pixel Value Transformation Functional Group. - * All values (Rescale Slope, Intercept and Type) are set to their only valid - * enumerated value listed in the standard, i.e. slope = 1, intercept = 0 and - * type = "US". - */ - FGIdentityPixelValueTransformation(); - - /** Destructor, frees memory - */ - virtual ~FGIdentityPixelValueTransformation(); - - /** Returns a deep copy of this object - * @return Deep copy of this object - */ - virtual FGBase *clone() const; - - /** Get shared type of this functional group (can be both, per-frame and - * shared) - * @return Always returns EFGS_BOTH - */ - virtual DcmFGTypes::E_FGSharedType getSharedType() const {return DcmFGTypes::EFGS_BOTH;} - - /** Clears all data - */ - virtual void clearData(); - - /** Check whether functional group contains valid data - * @return EC_Normal if data is valid, error otherwise - */ - virtual OFCondition check() const; - - /** Read functional group from given item, i.e.\ read Identity Pixel Value - * Transformation Sequence. Clears existing data before reading. - * @param item The item to read from - * @return EC_Normal if reading was successful, error otherwise - */ - virtual OFCondition read(DcmItem& item); - - /** Write functional group to given item, i.e.\ write Identity Pixel Value Transformation Sequence - * @param item The item to write to - * @return EC_Normal if writing was successful, error otherwise - */ - virtual OFCondition write(DcmItem& item); - - /** Get RescaleIntercept - * @param value Reference to variable in which the value should be stored - * @param pos Index of the value to get (0..vm-1), -1 for all components - * @return EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getRescaleIntercept(OFString &value, - const signed long pos = 0) const; - - /** Get RescaleSlope - * @param value Reference to variable in which the value should be stored - * @param pos Index of the value to get (0..vm-1), -1 for all components - * @return EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getRescaleSlope(OFString &value, - const signed long pos = 0) const; - - /** Get RescaleType - * @param value Reference to variable in which the value should be stored - * @param pos Index of the value to get (0..vm-1), -1 for all components - * @return EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getRescaleType(OFString &value, - const signed long pos = 0) const; - - /** Comparison operator that compares the normalized value of this object - * with a given object of the same type, i.e.\ the elements within both - * functional groups (this and rhs parameter) are compared by value! - * Both objects (this and rhs) need to have the same type (i.e.\ both - * FGUnknown) to be comparable. This function is used in order - * to decide whether a functional group already exists, or is new. This - * is used in particular to find out whether a given functional group - * can be shared (i.e.\ the same information already exists as shared - * functional group) or is different from the same shared group. In that - * case the shared functional group must be distributed into per-frame - * functional groups, instead. The exact implementation for implementing - * the comparison is not relevant. However, it must be a comparison - * by value. - * @param rhs the right hand side of the comparison - * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in the this object, or all compared components match - * but this component is shorter. Also returned if this type and - * rhs type (DcmFGTypes::E_FGType) do not match. - * 1 if either the value of the first component that does not match - * is greater in this object, or all compared components match - * but this component is longer. - */ - virtual int compare(const FGBase& rhs) const; - -protected: - - /** Set RescaleIntercept. Hidden from user since value must always be equal - * to 1 (automatically set on write). - * @param value Value to be set (single value only) or "" for no value - * @param checkValue Check 'value' for conformance with VR (DS) and VM (1) if enabled - * @return EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setRescaleIntercept(const OFString &value, - const OFBool checkValue = OFTrue); - - /** Set RescaleSlope. Hidden from user since value must always be equal - * to 1 (automatically set on write). - * @param value Value to be set (single value only) or "" for no value - * @param checkValue Check 'value' for conformance with VR (DS) and VM (1) if enabled - * @return EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setRescaleSlope(const OFString &value, - const OFBool checkValue = OFTrue); - - /** Set RescaleType. Hidden from user since value must always be equal - * to "US" for "unspecified" (automatically set on write). - * @param value Value to be set (single value only) or "" for no value - * @param checkValue Check 'value' for conformance with VR (LO) and VM (1) if enabled - * @return EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setRescaleType(const OFString &value, - const OFBool checkValue = OFTrue); - -private: - - /* Content of Identity Pixel Value Transformation Functional Group Macro */ - - /// RescaleIntercept (DS, VM 1, Required type 1) - DcmDecimalString m_RescaleIntercept; - - /// RescaleSlope (DS, VM 1, Required type 1) - DcmDecimalString m_RescaleSlope; - - /// RescaleType (LO, VM 1, Required type 1) - DcmLongString m_RescaleType; -}; - -#endif // FGIDENTPIXELTRANSFORM_H diff --git a/dcmfg/include/dcmtk/dcmfg/fgpixeltransform.h b/dcmfg/include/dcmtk/dcmfg/fgpixeltransform.h new file mode 100644 index 00000000..d98771fa --- /dev/null +++ b/dcmfg/include/dcmtk/dcmfg/fgpixeltransform.h @@ -0,0 +1,187 @@ +/* + * + * Copyright (C) 2016-2017, Open Connections GmbH + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmfg + * + * Author: Jan Schlamelcher + * + * Purpose: Class for managing the (Identity) Pixel Value Transformation FG + * + */ + +#ifndef FGPIXELTRANSFORM_H +#define FGPIXELTRANSFORM_H + +#include "dcmtk/config/osconfig.h" +#include "dcmtk/dcmdata/dcitem.h" +#include "dcmtk/dcmfg/fgbase.h" +#include "dcmtk/dcmdata/dcvrds.h" +#include "dcmtk/dcmdata/dcvrlo.h" + + +/** Class representing the Identity Pixel Value Transformation as well as the + * Pixel Value Transformation Functional Group Macro. + * The former just differs in a way that Rescale Slope, Intercept and Type + * have fixed values (1, 0 and "US" respectively). + * Rescale Intercept to 0. Right now the + */ +class DCMTK_DCMFG_EXPORT FGPixelValueTransformation : public FGBase +{ +public: + + /** Constructor, creates (Identity) Pixel Value Transformation Functional Group. + * All values (Rescale Slope, Intercept and Type) are initialized as if the + * class is used as the Identity Pixel Value Transformation FG, i.e. Rescale + * Slope is set to 1, Intercept to 0 and Type to "US". + */ + FGPixelValueTransformation(); + + /** Destructor, frees memory + */ + virtual ~FGPixelValueTransformation(); + + /** Tell this class that it should behave like the Identity Pixel Value + * Transformation Functional Group. This does not make a difference when + * reading data, but when writing, it is assured that Rescale Slope, + * Intercept and Type are forced to be set to 1, 0 and "US" respectively. + */ + virtual void setUseAsIdentityPixelValueTransformation(); + + /** Returns a deep copy of this object + * @return Deep copy of this object + */ + virtual FGBase *clone() const; + + /** Get shared type of this functional group (can be both, per-frame and + * shared) + * @return Always returns EFGS_BOTH + */ + virtual DcmFGTypes::E_FGSharedType getSharedType() const {return DcmFGTypes::EFGS_BOTH;} + + /** Clears all data + */ + virtual void clearData(); + + /** Check whether functional group contains valid data + * @return EC_Normal if data is valid, error otherwise + */ + virtual OFCondition check() const; + + /** Read functional group from given item, i.e.\ read (Identity) Pixel Value + * Transformation Sequence. Clears existing data before reading. + * @param item The item to read from + * @return EC_Normal if reading was successful, error otherwise + */ + virtual OFCondition read(DcmItem& item); + + /** Write functional group to given item, i.e.\ write (Identity) Pixel Value + * Transformation Sequence + * @param item The item to write to + * @return EC_Normal if writing was successful, error otherwise + */ + virtual OFCondition write(DcmItem& item); + + /** Get RescaleIntercept + * @param value Reference to variable in which the value should be stored + * @param pos Index of the value to get (0..vm-1), -1 for all components + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getRescaleIntercept(OFString &value, + const signed long pos = 0) const; + + /** Get RescaleSlope + * @param value Reference to variable in which the value should be stored + * @param pos Index of the value to get (0..vm-1), -1 for all components + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getRescaleSlope(OFString &value, + const signed long pos = 0) const; + + /** Get RescaleType + * @param value Reference to variable in which the value should be stored + * @param pos Index of the value to get (0..vm-1), -1 for all components + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getRescaleType(OFString &value, + const signed long pos = 0) const; + + /** Comparison operator that compares the normalized value of this object + * with a given object of the same type, i.e.\ the elements within both + * functional groups (this and rhs parameter) are compared by value! + * Both objects (this and rhs) need to have the same type (i.e.\ both + * FGUnknown) to be comparable. This function is used in order + * to decide whether a functional group already exists, or is new. This + * is used in particular to find out whether a given functional group + * can be shared (i.e.\ the same information already exists as shared + * functional group) or is different from the same shared group. In that + * case the shared functional group must be distributed into per-frame + * functional groups, instead. The exact implementation for implementing + * the comparison is not relevant. However, it must be a comparison + * by value. + * @param rhs the right hand side of the comparison + * @return 0 if the object values are equal. + * -1 if either the value of the first component that does not match + * is lower in the this object, or all compared components match + * but this component is shorter. Also returned if this type and + * rhs type (DcmFGTypes::E_FGType) do not match. + * 1 if either the value of the first component that does not match + * is greater in this object, or all compared components match + * but this component is longer. + */ + virtual int compare(const FGBase& rhs) const; + + /** Set RescaleIntercept + * @param value Value to be set (single value only) or "" for no value + * @param checkValue Check 'value' for conformance with VR (DS) and VM (1) if enabled + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setRescaleIntercept(const OFString &value, + const OFBool checkValue = OFTrue); + + /** Set RescaleSlope + * @param value Value to be set (single value only) or "" for no value + * @param checkValue Check 'value' for conformance with VR (DS) and VM (1) if enabled + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setRescaleSlope(const OFString &value, + const OFBool checkValue = OFTrue); + + /** Set RescaleType + * @param value Value to be set (single value only) or "" for no value + * @param checkValue Check 'value' for conformance with VR (LO) and VM (1) if enabled + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setRescaleType(const OFString &value, + const OFBool checkValue = OFTrue); + +private: + + /* Content of Identity Pixel Value Transformation Functional Group Macro */ + + /// RescaleIntercept (DS, VM 1, Required type 1) + DcmDecimalString m_RescaleIntercept; + + /// RescaleSlope (DS, VM 1, Required type 1) + DcmDecimalString m_RescaleSlope; + + /// RescaleType (LO, VM 1, Required type 1) + DcmLongString m_RescaleType; + + /// If OFTrue, tells this class that it should behave like the Identity Pixel + /// Value Transformation Functional Group. This does not make a difference when + /// reading data, but when writing, it is assured that Rescale Slope, + /// Intercept and Type are forced to be set to 1, 0 and "US" respectively. + OFBool m_UseAsIdentityPixelValueTransformationFG; +}; + +#endif // FGPIXELTRANSFORM_H diff --git a/dcmfg/include/dcmtk/dcmfg/fgtypes.h b/dcmfg/include/dcmtk/dcmfg/fgtypes.h index 22bdfca3..c75a4acb 100644 --- a/dcmfg/include/dcmtk/dcmfg/fgtypes.h +++ b/dcmfg/include/dcmtk/dcmfg/fgtypes.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -120,8 +120,6 @@ public: EFG_FRAMEPIXELSHIFT, /// "Frame VOI LUT" or "Frame VOI LUT with LUT" Macro (share same starting sequence) EFG_FRAMEVOILUTMETA, - /// Identity Pixel Value Transformation - EFG_IDENTITYPIXELVALUETRANSFORMATION, /// Image Data Type EFG_IMAGEDATATYPE, /// Irradiation Event Identification @@ -136,7 +134,8 @@ public: EFG_PIXELINTENSITYRELLUT, /// Pixel Measures EFG_PIXELMEASURES, - /// "Pixel Value Transformation" or "Identity Pixel Value Transformation" Macro (share same sequence and attributes) + /// "Pixel Value Transformation" or "Identity Pixel Value Transformation" + /// (both share the same sequence and attributes) EFG_PIXELVALUETRANSMETA, /// Plane Orientation (Volume) EFG_PLANEORIENTVOLUME, diff --git a/dcmfg/libsrc/CMakeLists.txt b/dcmfg/libsrc/CMakeLists.txt index 6d2afe3d..6426874d 100644 --- a/dcmfg/libsrc/CMakeLists.txt +++ b/dcmfg/libsrc/CMakeLists.txt @@ -7,7 +7,7 @@ DCMTK_ADD_LIBRARY(dcmfg fgfracon fgframeanatomy fgframevoilut - fgidentpixeltransform + fgpixeltransform fgimagedatatype fginterface fgpixmsr diff --git a/dcmfg/libsrc/Makefile.dep b/dcmfg/libsrc/Makefile.dep index 70083293..4dbc1ecf 100644 --- a/dcmfg/libsrc/Makefile.dep +++ b/dcmfg/libsrc/Makefile.dep @@ -1,16 +1,22 @@ -fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmfg/fg.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ +fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmfg/fgbase.h ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ - ../include/dcmtk/dcmfg/fgtypes.h ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ @@ -18,11 +24,12 @@ fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ ../../oflog/include/dcmtk/oflog/tstring.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -37,40 +44,34 @@ fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../../ofstd/include/dcmtk/ofstd/offile.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h \ - ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ - ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../include/dcmtk/dcmfg/fgtypes.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ - ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ + ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -112,26 +113,38 @@ fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ - ../include/dcmtk/dcmfg/fgdefine.h ../include/dcmtk/dcmfg/fgbase.h -fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmfg/fgbase.h ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../include/dcmtk/dcmfg/fgdefine.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodcommn.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ + ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ + ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ + ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \ + ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ + ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \ + ../../ofstd/include/dcmtk/ofstd/ofoption.h \ + ../../ofstd/include/dcmtk/ofstd/ofalign.h \ + ../../dcmiod/include/dcmtk/dcmiod/modgeneralstudy.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \ + ../../dcmiod/include/dcmtk/dcmiod/modequipment.h \ + ../../dcmiod/include/dcmtk/dcmiod/modgeneralseries.h \ + ../../dcmiod/include/dcmtk/dcmiod/modfor.h \ + ../../dcmiod/include/dcmtk/dcmiod/modsopcommon.h \ + ../../dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodreferences.h +fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmfg/fg.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h \ - ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ - ../../ofstd/include/dcmtk/ofstd/offile.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ - ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../include/dcmtk/dcmfg/fgtypes.h ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ @@ -139,12 +152,11 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -159,34 +171,40 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ - ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ - ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ - ../include/dcmtk/dcmfg/fgtypes.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ - ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -228,25 +246,7 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ - ../include/dcmtk/dcmfg/fgdefine.h \ - ../../dcmiod/include/dcmtk/dcmiod/iodcommn.h \ - ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ - ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ - ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ - ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ - ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \ - ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ - ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \ - ../../ofstd/include/dcmtk/ofstd/ofoption.h \ - ../../ofstd/include/dcmtk/ofstd/ofalign.h \ - ../../dcmiod/include/dcmtk/dcmiod/modgeneralstudy.h \ - ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \ - ../../dcmiod/include/dcmtk/dcmiod/modequipment.h \ - ../../dcmiod/include/dcmtk/dcmiod/modgeneralseries.h \ - ../../dcmiod/include/dcmtk/dcmiod/modfor.h \ - ../../dcmiod/include/dcmtk/dcmiod/modsopcommon.h \ - ../../dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h \ - ../../dcmiod/include/dcmtk/dcmiod/iodreferences.h + ../include/dcmtk/dcmfg/fgdefine.h ../include/dcmtk/dcmfg/fgbase.h fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -499,7 +499,7 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgfracon.h \ ../include/dcmtk/dcmfg/fgframeanatomy.h \ ../include/dcmtk/dcmfg/fgframevoilut.h \ - ../include/dcmtk/dcmfg/fgidentpixeltransform.h \ + ../include/dcmtk/dcmfg/fgpixeltransform.h \ ../include/dcmtk/dcmfg/fgimagedatatype.h \ ../include/dcmtk/dcmfg/fgparametricmapframetype.h \ ../include/dcmtk/dcmfg/fgpixmsr.h ../include/dcmtk/dcmfg/fgplanor.h \ @@ -881,7 +881,7 @@ fgframevoilut.o: fgframevoilut.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmfg/fgdefine.h -fgidentpixeltransform.o: fgidentpixeltransform.cc \ +fgimagedatatype.o: fgimagedatatype.cc \ ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -952,8 +952,8 @@ fgidentpixeltransform.o: fgidentpixeltransform.cc \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ - ../include/dcmtk/dcmfg/fgidentpixeltransform.h \ - ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \ + ../include/dcmtk/dcmfg/fgimagedatatype.h ../include/dcmtk/dcmfg/fgbase.h \ + ../include/dcmtk/dcmfg/fgtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ @@ -1005,26 +1005,29 @@ fgidentpixeltransform.o: fgidentpixeltransform.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmfg/fgdefine.h -fgimagedatatype.o: fgimagedatatype.cc \ +fginterface.o: fginterface.cc \ ../../config/include/dcmtk/config/osconfig.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -1038,9 +1041,6 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1053,7 +1053,6 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -1062,6 +1061,7 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ @@ -1073,11 +1073,9 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ - ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ - ../include/dcmtk/dcmfg/fgimagedatatype.h ../include/dcmtk/dcmfg/fgbase.h \ - ../include/dcmtk/dcmfg/fgtypes.h \ + ../include/dcmtk/dcmfg/fginterface.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ @@ -1086,6 +1084,7 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ @@ -1128,30 +1127,29 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ - ../include/dcmtk/dcmfg/fgdefine.h -fginterface.o: fginterface.cc \ + ../include/dcmtk/dcmfg/fgtypes.h ../include/dcmtk/dcmfg/fgdefine.h \ + ../include/dcmtk/dcmfg/fg.h ../include/dcmtk/dcmfg/fgbase.h \ + ../include/dcmtk/dcmfg/fgfact.h +fgparametricmapframetype.o: fgparametricmapframetype.cc \ ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -1165,6 +1163,9 @@ fginterface.o: fginterface.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1177,6 +1178,7 @@ fginterface.o: fginterface.cc \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -1185,7 +1187,6 @@ fginterface.o: fginterface.cc \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ @@ -1197,9 +1198,11 @@ fginterface.o: fginterface.cc \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ + ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ - ../include/dcmtk/dcmfg/fginterface.h \ + ../include/dcmtk/dcmfg/fgparametricmapframetype.h \ + ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ @@ -1208,7 +1211,6 @@ fginterface.o: fginterface.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ @@ -1251,10 +1253,8 @@ fginterface.o: fginterface.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ - ../include/dcmtk/dcmfg/fgtypes.h ../include/dcmtk/dcmfg/fgdefine.h \ - ../include/dcmtk/dcmfg/fg.h ../include/dcmtk/dcmfg/fgbase.h \ - ../include/dcmtk/dcmfg/fgfact.h -fgparametricmapframetype.o: fgparametricmapframetype.cc \ + ../include/dcmtk/dcmfg/fgdefine.h +fgpixeltransform.o: fgpixeltransform.cc \ ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -1325,7 +1325,7 @@ fgparametricmapframetype.o: fgparametricmapframetype.cc \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ - ../include/dcmtk/dcmfg/fgparametricmapframetype.h \ + ../include/dcmtk/dcmfg/fgpixeltransform.h \ ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ diff --git a/dcmfg/libsrc/Makefile.in b/dcmfg/libsrc/Makefile.in index cce48f35..def09187 100644 --- a/dcmfg/libsrc/Makefile.in +++ b/dcmfg/libsrc/Makefile.in @@ -25,7 +25,8 @@ LOCALDEFS = objs = fgderimg.o fgframevoilut.o fgpixmsr.o fgplanpo.o fgseg.o stackinterface.o \ fgbase.o fgfact.o fgimagedatatype.o fgplanor.o fgplanposvol.o fgtypes.o \ fg.o fgfracon.o fginterface.o fgplanorvol.o fgrealworldvaluemapping.o \ - fgusimagedescription.o stack.o + fgusimagedescription.o fgparametricmapframetype.o \ + fgpixeltransform.o fgframeanatomy.o stack.o library = libdcmfg.$(LIBEXT) diff --git a/dcmfg/libsrc/fgfact.cc b/dcmfg/libsrc/fgfact.cc index c8fcd303..a7146a93 100644 --- a/dcmfg/libsrc/fgfact.cc +++ b/dcmfg/libsrc/fgfact.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -26,7 +26,7 @@ #include "dcmtk/dcmfg/fgfracon.h" #include "dcmtk/dcmfg/fgframeanatomy.h" #include "dcmtk/dcmfg/fgframevoilut.h" -#include "dcmtk/dcmfg/fgidentpixeltransform.h" +#include "dcmtk/dcmfg/fgpixeltransform.h" #include "dcmtk/dcmfg/fgimagedatatype.h" #include "dcmtk/dcmfg/fgparametricmapframetype.h" #include "dcmtk/dcmfg/fgpixmsr.h" @@ -71,7 +71,7 @@ FGBase* FGFactory::create(const DcmFGTypes::E_FGType fgtype) case DcmFGTypes::EFG_FRAMECONTENT: return new FGFrameContent(); break; - case DcmFGTypes::EFG_FRAMEVOILUTMETA: // Frame VOI LUT and Frame VOI LUT with LUT + case DcmFGTypes::EFG_FRAMEVOILUTMETA: // Frame VOI LUT and Frame VOI LUT with LUT return new FGFrameVOILUT(); break; case DcmFGTypes::EFG_PARAMETRICMAPFRAMETYPE: @@ -90,8 +90,8 @@ FGBase* FGFactory::create(const DcmFGTypes::E_FGType fgtype) case DcmFGTypes::EFG_DERIVATIONIMAGE: return new FGDerivationImage(); break; - case DcmFGTypes::EFG_IDENTITYPIXELVALUETRANSFORMATION: - return new FGIdentityPixelValueTransformation(); + case DcmFGTypes::EFG_PIXELVALUETRANSMETA: // Pixel Value Transformation Macro or Identity Pixel Value Transformation Macro: + return new FGPixelValueTransformation(); break; case DcmFGTypes::EFG_IMAGEDATATYPE: return new FGImageDataType(); @@ -106,7 +106,6 @@ FGBase* FGFactory::create(const DcmFGTypes::E_FGType fgtype) return new FGUSImageDescription(); break; case DcmFGTypes::EFG_CARDIACSYNC: - case DcmFGTypes::EFG_PIXELVALUETRANSMETA: // Pixel Value Transformation Macro or Identity Pixel Value Transformation Macro case DcmFGTypes::EFG_CONTRASTBOLUSUSAGE: case DcmFGTypes::EFG_PIXELINTENSITYRELLUT: case DcmFGTypes::EFG_FRAMEPIXELSHIFT: diff --git a/dcmfg/libsrc/fgidentpixeltransform.cc b/dcmfg/libsrc/fgidentpixeltransform.cc deleted file mode 100644 index ef5f6d42..00000000 --- a/dcmfg/libsrc/fgidentpixeltransform.cc +++ /dev/null @@ -1,229 +0,0 @@ -/* - * - * Copyright (C) 2016, Open Connections GmbH - * All rights reserved. See COPYRIGHT file for details. - * - * This software and supporting documentation are maintained by - * - * OFFIS e.V. - * R&D Division Health - * Escherweg 2 - * D-26121 Oldenburg, Germany - * - * - * Module: dcmpmap - * - * Author: Jan Schlamelcher - * - * Purpose: Class for managing the Identity Pixel Value Transformation - * - */ - -#include "dcmtk/config/osconfig.h" -#include "dcmtk/dcmdata/dcdeftag.h" -#include "dcmtk/dcmiod/iodutil.h" -#include "dcmtk/dcmfg/fgidentpixeltransform.h" - -FGIdentityPixelValueTransformation::FGIdentityPixelValueTransformation() -: FGBase(DcmFGTypes::EFG_UNDEFINED) -, m_RescaleIntercept(DCM_RescaleIntercept) -, m_RescaleSlope(DCM_RescaleSlope) -, m_RescaleType(DCM_RescaleType) -{ - m_RescaleIntercept.putOFStringArray("0"); - m_RescaleSlope.putOFStringArray("1"); - m_RescaleType.putOFStringArray("US"); -} - - -FGIdentityPixelValueTransformation::~FGIdentityPixelValueTransformation() -{ - -} - - -OFCondition FGIdentityPixelValueTransformation::check() const -{ - Float64 rs, ri; - rs = ri = 0; - OFString rt; - OFBool ok = OFTrue; - if (OFconst_cast(DcmDecimalString*, &m_RescaleIntercept)->getFloat64(ri).good()) - { - if (ri != 0) - { - DCMFG_ERROR("Rescale Intercept in Identity Pixel Value Transformation FG must be 0 but is set to " << ri); - ok = OFFalse; - } - } - else - { - DCMFG_ERROR("Invalid or no value for Rescale Intercept in Identity Pixel Value Transformation FG (0 is the only valid value"); - ok = OFFalse; - } - - if (OFconst_cast(DcmDecimalString*, &m_RescaleSlope)->getFloat64(rs).good()) - { - if (rs != 1) - { - DCMFG_ERROR("Rescale Slope in Identity Pixel Value Transformation FG must be 1 but is set to " << rs); - ok = OFFalse; - } - } - else - { - DCMFG_ERROR("Invalid or no value for Rescale Slope in Identity Pixel Value Transformation FG (1 is the only valid value"); - ok = OFFalse; - } - - if (OFconst_cast(DcmLongString*, &m_RescaleType)->getOFStringArray(rt).good()) - { - if (rt != "US") - { - DCMFG_ERROR("Rescale Type in Identity Pixel Value Transformation FG must be \"US\" but is set to " << rt); - ok = OFFalse; - } - } - else - { - DCMFG_ERROR("Invalid or no value for Rescale Type in Identity Pixel Value Transformation FG (\"US\" is the only valid value"); - ok = OFFalse; - } - if (ok) - { - return EC_Normal; - } - else - { - return FG_EC_InvalidData; - } -} - - -void FGIdentityPixelValueTransformation::clearData() -{ - m_RescaleIntercept.clear(); - m_RescaleSlope.clear(); - m_RescaleType.clear(); -} - - -FGBase* FGIdentityPixelValueTransformation::clone() const -{ - if(FGIdentityPixelValueTransformation* copy = new FGIdentityPixelValueTransformation) - { - copy->m_RescaleIntercept = m_RescaleIntercept; - copy->m_RescaleSlope = m_RescaleSlope; - copy->m_RescaleType = m_RescaleType; - return copy; - } - return OFnullptr; -} - - -OFCondition FGIdentityPixelValueTransformation::read(DcmItem& item) -{ - clearData(); - - DcmItem* seqItem; - OFCondition result; - - seqItem = OFnullptr; - result = getItemFromFGSequence(item, DCM_PixelValueTransformationSequence, 0, seqItem); - if(result.bad()) - return result; - DcmIODUtil::getAndCheckElementFromDataset(*seqItem, m_RescaleIntercept, "1", "1", "Identity Pixel Value Transformation"); - DcmIODUtil::getAndCheckElementFromDataset(*seqItem, m_RescaleSlope, "1", "1", "Identity Pixel Value Transformation"); - DcmIODUtil::getAndCheckElementFromDataset(*seqItem, m_RescaleType, "1", "1", "Identity Pixel Value Transformation"); - - return EC_Normal; -} - - -OFCondition FGIdentityPixelValueTransformation::write(DcmItem& item) -{ - DcmItem* seqItem; - DCMFG_DEBUG("Identity Pixel Value Transformation Macro: Fixing values for Rescale Slope, Intercept and Type to enumerated values '1', '0' and 'US'"); - m_RescaleSlope.putOFStringArray("1"); - m_RescaleIntercept.putOFStringArray("0"); - m_RescaleType.putOFStringArray("US"); - - seqItem = OFnullptr; - OFCondition result = createNewFGSequence(item, DCM_PixelValueTransformationSequence, 0, seqItem); - if(result.bad()) - return result; - DcmIODUtil::copyElementToDataset(result, *seqItem, m_RescaleIntercept, "1", "1", "Identity Pixel Value Transformation"); - DcmIODUtil::copyElementToDataset(result, *seqItem, m_RescaleSlope, "1", "1", "Identity Pixel Value Transformation"); - DcmIODUtil::copyElementToDataset(result, *seqItem, m_RescaleType, "1", "1", "Identity Pixel Value Transformation"); - - return result; -} - - -int FGIdentityPixelValueTransformation::compare(const FGBase& rhs) const -{ - int result = FGBase::compare(rhs); - if(result == 0) - { - const FGIdentityPixelValueTransformation* myRhs = OFstatic_cast(const FGIdentityPixelValueTransformation*, &rhs); - - // Compare all elements - result = m_RescaleIntercept.compare(myRhs->m_RescaleIntercept); - result = m_RescaleSlope.compare(myRhs->m_RescaleSlope); - result = m_RescaleType.compare(myRhs->m_RescaleType); - } - - return result; -} - - -OFCondition FGIdentityPixelValueTransformation::getRescaleIntercept(OFString &value, - const signed long pos) const -{ - return DcmIODUtil::getStringValueFromElement(m_RescaleIntercept, value, pos); -} - - -OFCondition FGIdentityPixelValueTransformation::getRescaleSlope(OFString &value, - const signed long pos) const -{ - return DcmIODUtil::getStringValueFromElement(m_RescaleSlope, value, pos); -} - - -OFCondition FGIdentityPixelValueTransformation::getRescaleType(OFString &value, - const signed long pos) const -{ - return DcmIODUtil::getStringValueFromElement(m_RescaleType, value, pos); -} - - -OFCondition FGIdentityPixelValueTransformation::setRescaleIntercept(const OFString &value, - const OFBool checkValue) -{ - OFCondition result = (checkValue) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; - if (result.good()) - result = m_RescaleIntercept.putString(value.c_str()); - return result; -} - - -OFCondition FGIdentityPixelValueTransformation::setRescaleSlope(const OFString &value, - const OFBool checkValue) -{ - OFCondition result = (checkValue) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; - if (result.good()) - result = m_RescaleSlope.putString(value.c_str()); - return result; -} - - -OFCondition FGIdentityPixelValueTransformation::setRescaleType(const OFString &value, - const OFBool checkValue) -{ - OFCondition result = (checkValue) ? DcmLongString::checkStringValue(value, "1") : EC_Normal; - if (result.good()) - result = m_RescaleType.putString(value.c_str()); - return result; -} - diff --git a/dcmfg/libsrc/fginterface.cc b/dcmfg/libsrc/fginterface.cc index 1bb58422..a5db7863 100644 --- a/dcmfg/libsrc/fginterface.cc +++ b/dcmfg/libsrc/fginterface.cc @@ -135,8 +135,10 @@ OFCondition FGInterface::addPerFrame(const Uint32 frameNo, { FGBase* copy = group.clone(); if (!copy) + { return EC_MemoryExhausted; - result = insertPerFrame(frameNo, copy); + } + result = insertPerFrame(frameNo, copy); if (result.bad()) delete copy; } diff --git a/dcmfg/libsrc/fgpixeltransform.cc b/dcmfg/libsrc/fgpixeltransform.cc new file mode 100644 index 00000000..0e7581b1 --- /dev/null +++ b/dcmfg/libsrc/fgpixeltransform.cc @@ -0,0 +1,237 @@ +/* + * + * Copyright (C) 2016-2017, Open Connections GmbH + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmpmap + * + * Author: Jan Schlamelcher + * + * Purpose: Class for managing the (Identity) Pixel Value Transformation FG + * + */ + +#include "dcmtk/config/osconfig.h" +#include "dcmtk/dcmdata/dcdeftag.h" +#include "dcmtk/dcmiod/iodutil.h" +#include "dcmtk/dcmfg/fgpixeltransform.h" + +FGPixelValueTransformation::FGPixelValueTransformation() +: FGBase(DcmFGTypes::EFG_UNDEFINED) +, m_RescaleIntercept(DCM_RescaleIntercept) +, m_RescaleSlope(DCM_RescaleSlope) +, m_RescaleType(DCM_RescaleType) +, m_UseAsIdentityPixelValueTransformationFG(OFFalse) +{ + m_RescaleIntercept.putOFStringArray("0"); + m_RescaleSlope.putOFStringArray("1"); + m_RescaleType.putOFStringArray("US"); +} + + +void FGPixelValueTransformation::setUseAsIdentityPixelValueTransformation() +{ + m_UseAsIdentityPixelValueTransformationFG = OFTrue; +} + + + +FGPixelValueTransformation::~FGPixelValueTransformation() +{ + +} + + +OFCondition FGPixelValueTransformation::check() const +{ + if (m_UseAsIdentityPixelValueTransformationFG) + { + Float64 rs, ri; + rs = ri = 0; + OFString rt; + OFBool ok = OFTrue; + if (OFconst_cast(DcmDecimalString*, &m_RescaleIntercept)->getFloat64(ri).good()) + { + if (ri != 0) + { + DCMFG_ERROR("Rescale Intercept in Identity Pixel Value Transformation FG must be 0 but is set to " << ri); + ok = OFFalse; + } + } + else + { + DCMFG_ERROR("Invalid or no value for Rescale Intercept in Identity Pixel Value Transformation FG (0 is the only valid value"); + ok = OFFalse; + } + + if (OFconst_cast(DcmDecimalString*, &m_RescaleSlope)->getFloat64(rs).good()) + { + if (rs != 1) + { + DCMFG_ERROR("Rescale Slope in Identity Pixel Value Transformation FG must be 1 but is set to " << rs); + ok = OFFalse; + } + } + else + { + DCMFG_ERROR("Invalid or no value for Rescale Slope in Identity Pixel Value Transformation FG (1 is the only valid value"); + ok = OFFalse; + } + + if (OFconst_cast(DcmLongString*, &m_RescaleType)->getOFStringArray(rt).good()) + { + if (rt != "US") + { + DCMFG_ERROR("Rescale Type in Identity Pixel Value Transformation FG must be \"US\" but is set to " << rt); + ok = OFFalse; + } + } + else + { + DCMFG_ERROR("Invalid or no value for Rescale Type in Identity Pixel Value Transformation FG (\"US\" is the only valid value"); + ok = OFFalse; + } + if (!ok) + { + return FG_EC_InvalidData; + } + } + return EC_Normal; +} + + +void FGPixelValueTransformation::clearData() +{ + m_RescaleIntercept.clear(); + m_RescaleSlope.clear(); + m_RescaleType.clear(); +} + + +FGBase* FGPixelValueTransformation::clone() const +{ + if(FGPixelValueTransformation* copy = new FGPixelValueTransformation) + { + copy->m_RescaleIntercept = m_RescaleIntercept; + copy->m_RescaleSlope = m_RescaleSlope; + copy->m_RescaleType = m_RescaleType; + return copy; + } + return OFnullptr; +} + + +OFCondition FGPixelValueTransformation::read(DcmItem& item) +{ + clearData(); + + DcmItem* seqItem; + OFCondition result; + + seqItem = OFnullptr; + result = getItemFromFGSequence(item, DCM_PixelValueTransformationSequence, 0, seqItem); + if(result.bad()) + return result; + DcmIODUtil::getAndCheckElementFromDataset(*seqItem, m_RescaleIntercept, "1", "1", "Identity Pixel Value Transformation"); + DcmIODUtil::getAndCheckElementFromDataset(*seqItem, m_RescaleSlope, "1", "1", "Identity Pixel Value Transformation"); + DcmIODUtil::getAndCheckElementFromDataset(*seqItem, m_RescaleType, "1", "1", "Identity Pixel Value Transformation"); + + return EC_Normal; +} + + +OFCondition FGPixelValueTransformation::write(DcmItem& item) +{ + DcmItem* seqItem; + DCMFG_DEBUG("Identity Pixel Value Transformation Macro: Fixing values for Rescale Slope, Intercept and Type to enumerated values '1', '0' and 'US'"); + m_RescaleSlope.putOFStringArray("1"); + m_RescaleIntercept.putOFStringArray("0"); + m_RescaleType.putOFStringArray("US"); + + seqItem = OFnullptr; + OFCondition result = createNewFGSequence(item, DCM_PixelValueTransformationSequence, 0, seqItem); + if(result.bad()) + return result; + DcmIODUtil::copyElementToDataset(result, *seqItem, m_RescaleIntercept, "1", "1", "Identity Pixel Value Transformation"); + DcmIODUtil::copyElementToDataset(result, *seqItem, m_RescaleSlope, "1", "1", "Identity Pixel Value Transformation"); + DcmIODUtil::copyElementToDataset(result, *seqItem, m_RescaleType, "1", "1", "Identity Pixel Value Transformation"); + + return result; +} + + +int FGPixelValueTransformation::compare(const FGBase& rhs) const +{ + int result = FGBase::compare(rhs); + if(result == 0) + { + const FGPixelValueTransformation* myRhs = OFstatic_cast(const FGPixelValueTransformation*, &rhs); + + // Compare all elements + result = m_RescaleIntercept.compare(myRhs->m_RescaleIntercept); + result = m_RescaleSlope.compare(myRhs->m_RescaleSlope); + result = m_RescaleType.compare(myRhs->m_RescaleType); + } + + return result; +} + + +OFCondition FGPixelValueTransformation::getRescaleIntercept(OFString &value, + const signed long pos) const +{ + return DcmIODUtil::getStringValueFromElement(m_RescaleIntercept, value, pos); +} + + +OFCondition FGPixelValueTransformation::getRescaleSlope(OFString &value, + const signed long pos) const +{ + return DcmIODUtil::getStringValueFromElement(m_RescaleSlope, value, pos); +} + + +OFCondition FGPixelValueTransformation::getRescaleType(OFString &value, + const signed long pos) const +{ + return DcmIODUtil::getStringValueFromElement(m_RescaleType, value, pos); +} + + +OFCondition FGPixelValueTransformation::setRescaleIntercept(const OFString &value, + const OFBool checkValue) +{ + OFCondition result = (checkValue) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = m_RescaleIntercept.putString(value.c_str()); + return result; +} + + +OFCondition FGPixelValueTransformation::setRescaleSlope(const OFString &value, + const OFBool checkValue) +{ + OFCondition result = (checkValue) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = m_RescaleSlope.putString(value.c_str()); + return result; +} + + +OFCondition FGPixelValueTransformation::setRescaleType(const OFString &value, + const OFBool checkValue) +{ + OFCondition result = (checkValue) ? DcmLongString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = m_RescaleType.putString(value.c_str()); + return result; +} + diff --git a/dcmfg/libsrc/fgtypes.cc b/dcmfg/libsrc/fgtypes.cc index fc5ca7c9..9fd72311 100644 --- a/dcmfg/libsrc/fgtypes.cc +++ b/dcmfg/libsrc/fgtypes.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -103,8 +103,6 @@ OFString DcmFGTypes::FGType2OFString(const DcmFGTypes::E_FGType fgType) case EFG_PLANEORIENTVOLUME: return "Plane Orientation (Volume) Functional Group Macro"; break; /// Temporal Position Macro case EFG_TEMPORALPOSITION: return "Temporal Position Functional Group Macro"; break; - /// Identity Pixel Value Transformation - case EFG_IDENTITYPIXELVALUETRANSFORMATION: return "Identity Pixel Value Transformation"; break; /// Image Data Type case EFG_IMAGEDATATYPE: return "Image Data Type Functional Group Macro"; break; /// Unassigned Shared Converted Attributes Macro @@ -167,8 +165,6 @@ DcmFGTypes::E_FGType DcmFGTypes::tagKey2FGType(const DcmTagKey& key) return EFG_PLANEORIENTVOLUME; else if (key == DCM_TemporalPositionSequence) return EFG_TEMPORALPOSITION; - else if (key == DCM_PixelValueTransformationSequence) - return EFG_IDENTITYPIXELVALUETRANSFORMATION; else if (key == DCM_ImageDataTypeSequence) return EFG_IMAGEDATATYPE; else if (key == DCM_UnassignedSharedConvertedAttributesSequence) diff --git a/dcmimage/apps/dcm2pnm.cc b/dcmimage/apps/dcm2pnm.cc index c5467498..a849297e 100644 --- a/dcmimage/apps/dcm2pnm.cc +++ b/dcmimage/apps/dcm2pnm.cc @@ -893,6 +893,9 @@ int main(int argc, char *argv[]) << DCM_DICT_ENVIRONMENT_VARIABLE); } + if (opt_suppressOutput && opt_ofname) + OFLOG_WARN(dcm2pnmLogger, "ignoring parameter bitmap-out because of option --no-output"); + OFLOG_INFO(dcm2pnmLogger, "reading DICOM file: " << opt_ifname); // register RLE decompression codec diff --git a/dcmimage/include/CMakeLists.txt b/dcmimage/include/CMakeLists.txt index e8dbcd6f..f0c0abaf 100644 --- a/dcmimage/include/CMakeLists.txt +++ b/dcmimage/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmimage DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmimage DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmimgle/data/CMakeLists.txt b/dcmimgle/data/CMakeLists.txt index fc17af8d..22b3dd2c 100644 --- a/dcmimgle/data/CMakeLists.txt +++ b/dcmimgle/data/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES camera.lut monitor.lut printer.lut scanner.lut DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data) +INSTALL(FILES camera.lut monitor.lut printer.lut scanner.lut DESTINATION "${CMAKE_INSTALL_DATADIR}/dcmtk" COMPONENT data) diff --git a/dcmimgle/include/CMakeLists.txt b/dcmimgle/include/CMakeLists.txt index 5d67d80b..3f73b618 100644 --- a/dcmimgle/include/CMakeLists.txt +++ b/dcmimgle/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmimgle DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmimgle DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h b/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h index 6f30bc91..b0f4a8d9 100644 --- a/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h +++ b/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2016, OFFIS e.V. + * Copyright (C) 1996-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -157,7 +157,7 @@ class DiInputPixelTemplate if ((PixelCount == 0) || (PixelStart + PixelCount > Count)) // check for corrupt pixel length { PixelCount = Count - PixelStart; - DCMIMGLE_DEBUG("setting number of pixels to be processed (PixelCount) to: " << PixelCount); + DCMIMGLE_DEBUG("setting number of pixels to be processed (PixelCount) to " << PixelCount); } } diff --git a/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h b/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h index 0895a6d1..9eca0fd5 100644 --- a/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h +++ b/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2016, OFFIS e.V. + * Copyright (C) 1996-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -54,9 +54,6 @@ class DiMonoInputPixelTemplate DiMonoModality *modality) : DiMonoPixelTemplate(pixel, modality) { - /* erase empty part of the buffer (= blacken the background) */ - if ((this->Data != NULL) && (this->InputCount < this->Count)) - OFBitmanipTemplate::zeroMem(this->Data + this->InputCount, this->Count - this->InputCount); if ((pixel != NULL) && (this->Count > 0)) { // check whether to apply any modality transform @@ -74,6 +71,9 @@ class DiMonoInputPixelTemplate rescale(pixel); // "copy" or reference pixel data this->determineMinMax(OFstatic_cast(T3, this->Modality->getMinValue()), OFstatic_cast(T3, this->Modality->getMaxValue())); } + /* erase empty part of the buffer (= blacken the background) */ + if ((this->Data != NULL) && (this->InputCount < this->Count)) + OFBitmanipTemplate::zeroMem(this->Data + this->InputCount, this->Count - this->InputCount); } } @@ -131,7 +131,7 @@ class DiMonoInputPixelTemplate this->Data = new T3[this->Count]; if (this->Data != NULL) { - DCMIMGLE_DEBUG("applying modality tranformation with LUT (" << mlut->getCount() << " entries)"); + DCMIMGLE_DEBUG("applying modality transformation with LUT (" << mlut->getCount() << " entries)"); T2 value = 0; const T2 firstentry = mlut->getFirstEntry(value); // choose signed/unsigned method const T2 lastentry = mlut->getLastEntry(value); @@ -209,6 +209,7 @@ class DiMonoInputPixelTemplate { if (!useInputBuffer) { + DCMIMGLE_DEBUG("copying pixel data from input buffer"); const T1 *p = pixel + input->getPixelStart(); for (i = this->InputCount; i != 0; --i) // copy pixel data: can't use copyMem because T1 isn't always equal to T3 *(q++) = OFstatic_cast(T3, *(p++)); diff --git a/dcmimgle/libsrc/Makefile.dep b/dcmimgle/libsrc/Makefile.dep index 54cfad37..5d51ca30 100644 --- a/dcmimgle/libsrc/Makefile.dep +++ b/dcmimgle/libsrc/Makefile.dep @@ -870,29 +870,39 @@ dimo2img.o: dimo2img.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimomod.h ../include/dcmtk/dcmimgle/diluptab.h \ ../include/dcmtk/dcmimgle/dibaslut.h ../include/dcmtk/dcmimgle/dimoopx.h \ ../include/dcmtk/dcmimgle/didispfn.h -dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \ +dimoimg3.o: dimoimg3.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmimgle/dimoimg.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../include/dcmtk/dcmimgle/diimage.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ - ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ - ../../ofstd/include/dcmtk/ofstd/ofcast.h \ - ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../oflog/include/dcmtk/oflog/tstring.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ @@ -906,26 +916,16 @@ dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../../ofstd/include/dcmtk/ofstd/offile.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h \ - ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ - ../include/dcmtk/dcmimgle/dimoimg.h ../include/dcmtk/dcmimgle/diimage.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ @@ -938,23 +938,12 @@ dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimomod.h ../include/dcmtk/dcmimgle/diluptab.h \ ../include/dcmtk/dcmimgle/dibaslut.h ../include/dcmtk/dcmimgle/dimoopx.h \ ../include/dcmtk/dcmimgle/didispfn.h \ - ../include/dcmtk/dcmimgle/dimo2img.h \ ../include/dcmtk/dcmimgle/dimoipxt.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \ - ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimocpt.h \ - ../include/dcmtk/dcmimgle/dimosct.h ../include/dcmtk/dcmimgle/discalet.h \ - ../include/dcmtk/dcmimgle/ditranst.h ../include/dcmtk/dcmimgle/dimoflt.h \ - ../include/dcmtk/dcmimgle/diflipt.h ../include/dcmtk/dcmimgle/dimorot.h \ - ../include/dcmtk/dcmimgle/dirotat.h ../include/dcmtk/dcmimgle/dimoopxt.h \ - ../include/dcmtk/dcmimgle/didislut.h ../include/dcmtk/dcmimgle/digsdfn.h \ - ../include/dcmtk/dcmimgle/didocu.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ - ../include/dcmtk/dcmimgle/diregbas.h -dimoimg3.o: dimoimg3.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \ + ../include/dcmtk/dcmimgle/didislut.h +dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimoimg.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../include/dcmtk/dcmimgle/diimage.h \ @@ -1027,7 +1016,7 @@ dimoimg3.o: dimoimg3.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \ ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \ ../include/dcmtk/dcmimgle/didislut.h -dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \ +dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimoimg.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../include/dcmtk/dcmimgle/diimage.h \ @@ -1100,39 +1089,29 @@ dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \ ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \ ../include/dcmtk/dcmimgle/didislut.h -dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmimgle/dimoimg.h \ - ../../ofstd/include/dcmtk/ofstd/ofcast.h \ - ../include/dcmtk/dcmimgle/diimage.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ - ../../ofstd/include/dcmtk/ofstd/offile.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ - ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ - ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h \ - ../../ofstd/include/dcmtk/ofstd/oferror.h \ +dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ @@ -1146,16 +1125,26 @@ dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../include/dcmtk/dcmimgle/dimoimg.h ../include/dcmtk/dcmimgle/diimage.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ @@ -1168,11 +1157,22 @@ dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimomod.h ../include/dcmtk/dcmimgle/diluptab.h \ ../include/dcmtk/dcmimgle/dibaslut.h ../include/dcmtk/dcmimgle/dimoopx.h \ ../include/dcmtk/dcmimgle/didispfn.h \ + ../include/dcmtk/dcmimgle/dimo2img.h \ ../include/dcmtk/dcmimgle/dimoipxt.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \ - ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \ - ../include/dcmtk/dcmimgle/didislut.h + ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimocpt.h \ + ../include/dcmtk/dcmimgle/dimosct.h ../include/dcmtk/dcmimgle/discalet.h \ + ../include/dcmtk/dcmimgle/ditranst.h ../include/dcmtk/dcmimgle/dimoflt.h \ + ../include/dcmtk/dcmimgle/diflipt.h ../include/dcmtk/dcmimgle/dimorot.h \ + ../include/dcmtk/dcmimgle/dirotat.h ../include/dcmtk/dcmimgle/dimoopxt.h \ + ../include/dcmtk/dcmimgle/didislut.h ../include/dcmtk/dcmimgle/digsdfn.h \ + ../include/dcmtk/dcmimgle/didocu.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ + ../include/dcmtk/dcmimgle/diregbas.h dimomod.o: dimomod.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ diff --git a/dcmimgle/libsrc/diovlay.cc b/dcmimgle/libsrc/diovlay.cc index 1bffc04e..adfe7b4d 100644 --- a/dcmimgle/libsrc/diovlay.cc +++ b/dcmimgle/libsrc/diovlay.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2016, OFFIS e.V. + * Copyright (C) 1996-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -246,7 +246,7 @@ int DiOverlay::convertToPlaneNumber(unsigned int &plane, { plane = (plane - FirstOverlayGroup) >> 1; // plane = (group - 0x6000) / 2 if (Data->Planes[plane] != NULL) - return 2; // plane alreay exists + return 2; // plane already exists return 1; // ... is new } else { unsigned int i; diff --git a/dcmiod/include/CMakeLists.txt b/dcmiod/include/CMakeLists.txt index 1499d79e..e73b3ced 100644 --- a/dcmiod/include/CMakeLists.txt +++ b/dcmiod/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmiod DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE) +INSTALL(DIRECTORY dcmtk/dcmiod DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE) diff --git a/dcmiod/include/dcmtk/dcmiod/cielabutil.h b/dcmiod/include/dcmtk/dcmiod/cielabutil.h old mode 100755 new mode 100644 diff --git a/dcmiod/include/dcmtk/dcmiod/iodcommn.h b/dcmiod/include/dcmtk/dcmiod/iodcommn.h index a9c88193..5b5739d5 100644 --- a/dcmiod/include/dcmtk/dcmiod/iodcommn.h +++ b/dcmiod/include/dcmtk/dcmiod/iodcommn.h @@ -182,49 +182,28 @@ public: * not be present in this class either. * @return EC_Normal if successful, an error code otherwise */ - virtual OFCondition import(DcmItem& dataset, - const OFBool readPatient, - const OFBool readStudy, - const OFBool readFoR = OFFalse, - const OFBool readSeries = OFFalse, - const OFBool takeOverCharset = OFTrue); - - /** Import common module attributes from DICOM file but only read Patient, Study, + virtual OFCondition importHierarchy(DcmItem& dataset, + const OFBool readPatient, + const OFBool readStudy, + const OFBool readFoR = OFFalse, + const OFBool readSeries = OFFalse, + const OFBool takeOverCharset = OFTrue); + + /** CAUTION: Parameter order (readFoR and readSeries) changed compared to the + * old import() function. + * Import common module attributes from DICOM file but only read Patient, Study, * Series and/or Frame of Reference level portions. The current content * is not deleted before reading. If the log stream is set and valid the * reason for any error might be obtained from the error/warning output. - * This function is deprecated and might be removed in later versions of - * DCMTK. Use the import() call offering the same parameters and - * functionality, instead. * @param filename The filename to read from. - * @param usePatient If OFTrue, Patient level information is imported - * @param useStudy If OFTrue, Study level information is imported - * @param useSeries If OFTrue, Series level information is imported - * @param useFoR If OFTrue, Frame of Reference information is imported - * @param takeOverCharset If OFTrue (default), Specific Character Set is - * taken over from imported dataset. If it's not - * present or empty (invalid), the attribute will - * not be present in this class either. - - * @return EC_Normal if reading was successful (i.e.\ if any information could - * be read), otherwise an error is returned - */ - OFCondition importPatientStudyFoR(const OFString& filename, - const OFBool usePatient, - const OFBool useStudy, - const OFBool useSeries, - const OFBool useFoR = OFFalse, - OFBool takeOverCharset = OFTrue); - - /** Import common module attributes from DICOM file but only read Patient, Study, - * Series and/or Frame of Reference level portions. The current content - * is not deleted before reading. If the log stream is set and valid the - * reason for any error might be obtained from the error/warning output. - * @param filename The filename to read from - * @param usePatient If OFTrue, Patient level information is imported - * @param useStudy If OFTrue, Study level information is imported - * @param useSeries If OFTrue, Series level information is imported - * @param useFoR If OFTrue, Frame of Reference information is imported + * @param readPatient Read Patient-level information if OFTrue + * @param readStudy Read Study-level information if OFTrue, including + * equipment module + * @param readFoR Read Frame of Reference information if OFTrue. See + * also readSeries parameter. + * @param readSeries Read Series-level information if OFTrue, always + * includes Frame of Reference, i.e.\ readFoR is + * considered to be OFTrue * @param takeOverCharset If OFTrue (default), Specific Character Set is * taken over from imported dataset. If it's not * present or empty (invalid), the attribute will @@ -232,13 +211,12 @@ public: * @return EC_Normal if reading was successful (i.e.\ if any information could * be read), otherwise an error is returned */ - virtual OFCondition import(const OFString& filename, - const OFBool usePatient, - const OFBool useStudy, - const OFBool useSeries, - const OFBool useFoR = OFFalse, - const OFBool takeOverCharset = OFTrue); - + virtual OFCondition importHierarchy(const OFString& filename, + const OFBool readPatient, + const OFBool readStudy, + const OFBool readFoR = OFFalse, + const OFBool readSeries = OFFalse, + const OFBool takeOverCharset = OFTrue); /** Write the attributes managed by this class to DICOM dataset. * @param dataset Reference to DICOM dataset to which the current document diff --git a/dcmiod/libsrc/Makefile.dep b/dcmiod/libsrc/Makefile.dep index 4c4ce168..32d01341 100644 --- a/dcmiod/libsrc/Makefile.dep +++ b/dcmiod/libsrc/Makefile.dep @@ -1883,9 +1883,8 @@ modhelp.o: modhelp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h -modimagepixel.o: modimagepixel.cc \ +modimagepixelbase.o: modimagepixelbase.cc \ ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmiod/modimagepixel.h \ ../include/dcmtk/dcmiod/modimagepixelbase.h \ ../include/dcmtk/dcmiod/modbase.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ @@ -1959,8 +1958,9 @@ modimagepixel.o: modimagepixel.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../ofstd/include/dcmtk/ofstd/oftime.h -modimagepixelbase.o: modimagepixelbase.cc \ +modimagepixel.o: modimagepixel.cc \ ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmiod/modimagepixel.h \ ../include/dcmtk/dcmiod/modimagepixelbase.h \ ../include/dcmtk/dcmiod/modbase.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ diff --git a/dcmiod/libsrc/cielabutil.cc b/dcmiod/libsrc/cielabutil.cc old mode 100755 new mode 100644 diff --git a/dcmiod/libsrc/iodcommn.cc b/dcmiod/libsrc/iodcommn.cc index 195bf502..06fc3112 100644 --- a/dcmiod/libsrc/iodcommn.cc +++ b/dcmiod/libsrc/iodcommn.cc @@ -174,12 +174,12 @@ OFCondition DcmIODCommon::read(DcmItem &dataset) } -OFCondition DcmIODCommon::import(DcmItem& dataset, - const OFBool readPatient, - const OFBool readStudy, - const OFBool readFoR, - const OFBool readSeries, - const OFBool takeOverCharset) +OFCondition DcmIODCommon::importHierarchy(DcmItem& dataset, + const OFBool readPatient, + const OFBool readStudy, + const OFBool readFoR, + const OFBool readSeries, + const OFBool takeOverCharset) { if (readPatient) { @@ -229,24 +229,12 @@ OFCondition DcmIODCommon::import(DcmItem& dataset, } -OFCondition DcmIODCommon::importPatientStudyFoR(const OFString& filename, - const OFBool usePatient, - const OFBool useStudy, - const OFBool useSeries, - const OFBool useFoR, - const OFBool takeOverCharset) -{ - DCMIOD_WARN("This function is deprecated and will be removed in later versions of DCMTK, please use import()"); - return import(filename, usePatient, useStudy, useSeries, useFoR, takeOverCharset); -} - - -OFCondition DcmIODCommon::import(const OFString& filename, - const OFBool usePatient, - const OFBool useStudy, - const OFBool useSeries, - const OFBool useFoR, - const OFBool takeOverCharset) +OFCondition DcmIODCommon::importHierarchy(const OFString& filename, + const OFBool readPatient, + const OFBool readStudy, + const OFBool readFoR, + const OFBool readSeries, + const OFBool takeOverCharset) { DcmFileFormat dcmff; OFCondition result = dcmff.loadFile(filename.c_str()); @@ -255,7 +243,7 @@ OFCondition DcmIODCommon::import(const OFString& filename, DcmDataset *dset = dcmff.getDataset(); if (dset != NULL) { - result = import(*dset, usePatient, useStudy, useSeries, useFoR, takeOverCharset); + result = importHierarchy(*dset, readPatient, readStudy, readFoR, readSeries, takeOverCharset); } else { diff --git a/dcmiod/libsrc/iodreferences.cc b/dcmiod/libsrc/iodreferences.cc old mode 100755 new mode 100644 diff --git a/dcmjpeg/include/CMakeLists.txt b/dcmjpeg/include/CMakeLists.txt index 1a8c028d..eb9d4a96 100644 --- a/dcmjpeg/include/CMakeLists.txt +++ b/dcmjpeg/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmjpeg DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmjpeg DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmjpeg/libijg12/jdcoefct.c b/dcmjpeg/libijg12/jdcoefct.c index 61e8b344..7e4208d2 100644 --- a/dcmjpeg/libijg12/jdcoefct.c +++ b/dcmjpeg/libijg12/jdcoefct.c @@ -417,7 +417,7 @@ smoothing_ok (j_decompress_ptr cinfo) int * coef_bits; int * coef_bits_latch; - if (! cinfo->process == JPROC_PROGRESSIVE || cinfo->coef_bits == NULL) + if ((! (cinfo->process == JPROC_PROGRESSIVE)) || cinfo->coef_bits == NULL) return FALSE; /* Allocate latch area if not already done */ diff --git a/dcmjpeg/libijg16/jdcoefct.c b/dcmjpeg/libijg16/jdcoefct.c index fe0048c0..332b4982 100644 --- a/dcmjpeg/libijg16/jdcoefct.c +++ b/dcmjpeg/libijg16/jdcoefct.c @@ -417,7 +417,7 @@ smoothing_ok (j_decompress_ptr cinfo) int * coef_bits; int * coef_bits_latch; - if (! cinfo->process == JPROC_PROGRESSIVE || cinfo->coef_bits == NULL) + if ((! (cinfo->process == JPROC_PROGRESSIVE)) || cinfo->coef_bits == NULL) return FALSE; /* Allocate latch area if not already done */ diff --git a/dcmjpeg/libijg8/jdcoefct.c b/dcmjpeg/libijg8/jdcoefct.c index ce9c2002..d950446d 100644 --- a/dcmjpeg/libijg8/jdcoefct.c +++ b/dcmjpeg/libijg8/jdcoefct.c @@ -417,7 +417,7 @@ smoothing_ok (j_decompress_ptr cinfo) int * coef_bits; int * coef_bits_latch; - if (! cinfo->process == JPROC_PROGRESSIVE || cinfo->coef_bits == NULL) + if ((! (cinfo->process == JPROC_PROGRESSIVE)) || cinfo->coef_bits == NULL) return FALSE; /* Allocate latch area if not already done */ diff --git a/dcmjpls/include/CMakeLists.txt b/dcmjpls/include/CMakeLists.txt index a83fe385..936c7558 100644 --- a/dcmjpls/include/CMakeLists.txt +++ b/dcmjpls/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmjpls DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmjpls DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmnet/apps/CMakeLists.txt b/dcmnet/apps/CMakeLists.txt index c3837ef4..d35448ab 100644 --- a/dcmnet/apps/CMakeLists.txt +++ b/dcmnet/apps/CMakeLists.txt @@ -9,7 +9,19 @@ ENDFOREACH(PROGRAM) # declare installation files IF(WITH_OPENSSL) IF(WIN32) - INSTALL(FILES "${OPENSSL_BINDIR}/dcmtkeay.dll" "${OPENSSL_BINDIR}/dcmtkssl.dll" DESTINATION "${DCMTK_INSTALL_BINDIR}" COMPONENT bin) + INSTALL(DIRECTORY "${OPENSSL_BINDIR}/" + DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT bin + CONFIGURATIONS Release MinSizeRel + FILES_MATCHING REGEX "dcmtk(eay|crypto|ssl).*\\.dll" + REGEX "dcmtk(eay|crypto|ssl)_d.*\\.dll" EXCLUDE + ) + INSTALL(DIRECTORY "${OPENSSL_BINDIR}/" + DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT bin + CONFIGURATIONS Debug RelWithDebInfo + FILES_MATCHING REGEX "dcmtk(eay|crypto|ssl)_d.*\\.dll" + ) ENDIF(WIN32) ENDIF(WITH_OPENSSL) diff --git a/dcmnet/apps/Makefile.dep b/dcmnet/apps/Makefile.dep index 6be88978..9093bbdc 100644 --- a/dcmnet/apps/Makefile.dep +++ b/dcmnet/apps/Makefile.dep @@ -330,7 +330,8 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ - ../include/dcmtk/dcmnet/diutil.h \ + ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dcmtrans.h \ + ../include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ @@ -338,7 +339,6 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \ - ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \ ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -414,6 +414,7 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrmz.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \ + ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \ ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \ diff --git a/dcmnet/apps/echoscu.cc b/dcmnet/apps/echoscu.cc index a24b2219..148bf4dd 100644 --- a/dcmnet/apps/echoscu.cc +++ b/dcmnet/apps/echoscu.cc @@ -29,6 +29,7 @@ #include "dcmtk/dcmnet/dimse.h" #include "dcmtk/dcmnet/diutil.h" +#include "dcmtk/dcmnet/dcmtrans.h" /* for dcmSocketSend/ReceiveTimeout */ #include "dcmtk/dcmdata/dcfilefo.h" #include "dcmtk/dcmdata/dcdict.h" #include "dcmtk/dcmdata/dcuid.h" @@ -109,47 +110,57 @@ static const char* transferSyntaxes[] = { // ******************************************** +/* helper macro for converting stream output to a string */ +#define CONVERT_TO_STRING(output, string) \ + optStream.str(""); \ + optStream.clear(); \ + optStream << output << OFStringStream_ends; \ + OFSTRINGSTREAM_GETOFSTRING(optStream, string) + #define SHORTCOL 4 #define LONGCOL 19 int main(int argc, char *argv[]) { - const char * opt_peer = NULL; - OFCmdUnsignedInt opt_port = 104; - const char * opt_peerTitle = PEERAPPLICATIONTITLE; - const char * opt_ourTitle = APPLICATIONTITLE; - OFCmdUnsignedInt opt_maxReceivePDULength = ASC_DEFAULTMAXPDU; - OFCmdUnsignedInt opt_repeatCount = 1; - OFBool opt_abortAssociation = OFFalse; - OFCmdUnsignedInt opt_numXferSyntaxes = 1; - OFCmdUnsignedInt opt_numPresentationCtx = 1; - OFCmdUnsignedInt maxXferSyntaxes = OFstatic_cast(OFCmdUnsignedInt, (DIM_OF(transferSyntaxes))); - OFBool opt_secureConnection = OFFalse; /* default: no secure connection */ - int opt_acse_timeout = 30; + OFOStringStream optStream; + + const char * opt_peer = NULL; + OFCmdUnsignedInt opt_port = 104; + const char * opt_peerTitle = PEERAPPLICATIONTITLE; + const char * opt_ourTitle = APPLICATIONTITLE; + OFCmdUnsignedInt opt_maxReceivePDULength = ASC_DEFAULTMAXPDU; + OFCmdUnsignedInt opt_repeatCount = 1; + OFBool opt_abortAssociation = OFFalse; + OFCmdUnsignedInt opt_numXferSyntaxes = 1; + OFCmdUnsignedInt opt_numPresentationCtx = 1; + OFCmdUnsignedInt maxXferSyntaxes = OFstatic_cast(OFCmdUnsignedInt, (DIM_OF(transferSyntaxes))); + OFBool opt_secureConnection = OFFalse; /* default: no secure connection */ + int opt_acse_timeout = 30; + OFCmdSignedInt opt_socket_timeout = 60; #ifdef WITH_OPENSSL - int opt_keyFileFormat = SSL_FILETYPE_PEM; - OFBool opt_doAuthenticate = OFFalse; - const char *opt_privateKeyFile = NULL; - const char *opt_certificateFile = NULL; - const char *opt_passwd = NULL; + int opt_keyFileFormat = SSL_FILETYPE_PEM; + OFBool opt_doAuthenticate = OFFalse; + const char *opt_privateKeyFile = NULL; + const char *opt_certificateFile = NULL; + const char *opt_passwd = NULL; #if OPENSSL_VERSION_NUMBER >= 0x0090700fL - OFString opt_ciphersuites(TLS1_TXT_RSA_WITH_AES_128_SHA ":" SSL3_TXT_RSA_DES_192_CBC3_SHA); + OFString opt_ciphersuites(TLS1_TXT_RSA_WITH_AES_128_SHA ":" SSL3_TXT_RSA_DES_192_CBC3_SHA); #else - OFString opt_ciphersuites(SSL3_TXT_RSA_DES_192_CBC3_SHA); + OFString opt_ciphersuites(SSL3_TXT_RSA_DES_192_CBC3_SHA); #endif - const char *opt_readSeedFile = NULL; - const char *opt_writeSeedFile = NULL; - DcmCertificateVerification opt_certVerification = DCV_requireCertificate; - const char *opt_dhparam = NULL; + const char *opt_readSeedFile = NULL; + const char *opt_writeSeedFile = NULL; + DcmCertificateVerification opt_certVerification = DCV_requireCertificate; + const char *opt_dhparam = NULL; #endif - T_ASC_Network *net; - T_ASC_Parameters *params; - DIC_NODENAME peerHost; - T_ASC_Association *assoc; - OFString temp_str; + T_ASC_Network *net; + T_ASC_Parameters *params; + DIC_NODENAME peerHost; + T_ASC_Association *assoc; + OFString temp_str; OFStandard::initializeNetwork(); @@ -169,14 +180,8 @@ main(int argc, char *argv[]) cmd.addGroup("network options:"); cmd.addSubGroup("application entity titles:"); - OFString opt1 = "set my calling AE title (default: "; - opt1 += APPLICATIONTITLE; - opt1 += ")"; - cmd.addOption("--aetitle", "-aet", 1, "[a]etitle: string", opt1.c_str()); - OFString opt2 = "set called AE title of peer (default: "; - opt2 += PEERAPPLICATIONTITLE; - opt2 += ")"; - cmd.addOption("--call", "-aec", 1, "[a]etitle: string", opt2.c_str()); + cmd.addOption("--aetitle", "-aet", 1, "[a]etitle: string", "set my calling AE title (default: " APPLICATIONTITLE ")"); + cmd.addOption("--call", "-aec", 1, "[a]etitle: string", "set called AE title of peer (default: " PEERAPPLICATIONTITLE ")"); cmd.addSubGroup("association negotiation debugging:"); OFString opt5 = "[n]umber: integer (1.."; sprintf(tempstr, "%ld", OFstatic_cast(long, maxXferSyntaxes)); @@ -187,21 +192,15 @@ main(int argc, char *argv[]) cmd.addSubGroup("other network options:"); cmd.addOption("--timeout", "-to", 1, "[s]econds: integer (default: unlimited)", "timeout for connection requests"); - cmd.addOption("--acse-timeout", "-ta", 1, "[s]econds: integer (default: 30)", "timeout for ACSE messages"); + CONVERT_TO_STRING("[s]econds: integer (default: " << opt_socket_timeout << ")", optString1); + cmd.addOption("--socket-timeout", "-ts", 1, optString1.c_str(), "timeout for network socket (0 for none)"); + CONVERT_TO_STRING("[s]econds: integer (default: " << opt_acse_timeout << ")", optString2); + cmd.addOption("--acse-timeout", "-ta", 1, optString2.c_str(), "timeout for ACSE messages"); cmd.addOption("--dimse-timeout", "-td", 1, "[s]econds: integer (default: unlimited)", "timeout for DIMSE messages"); - OFString opt3 = "set max receive pdu to n bytes (default: "; - sprintf(tempstr, "%ld", OFstatic_cast(long, ASC_DEFAULTMAXPDU)); - opt3 += tempstr; - opt3 += ")"; - OFString opt4 = "[n]umber of bytes: integer ("; - sprintf(tempstr, "%ld", OFstatic_cast(long, ASC_MINIMUMPDUSIZE)); - opt4 += tempstr; - opt4 += ".."; - sprintf(tempstr, "%ld", OFstatic_cast(long, ASC_MAXIMUMPDUSIZE)); - opt4 += tempstr; - opt4 += ")"; - cmd.addOption("--max-pdu", "-pdu", 1, opt4.c_str(), opt3.c_str()); + CONVERT_TO_STRING("[n]umber of bytes: integer (" << ASC_MINIMUMPDUSIZE << ".." << ASC_MAXIMUMPDUSIZE << ")", optString3); + CONVERT_TO_STRING("set max receive pdu to n bytes (default: " << opt_maxReceivePDULength << ")", optString4); + cmd.addOption("--max-pdu", "-pdu", 1, optString3.c_str(), optString4.c_str()); cmd.addOption("--repeat", 1, "[n]umber: integer", "repeat n times"); cmd.addOption("--abort", "abort association instead of releasing it"); @@ -285,6 +284,12 @@ main(int argc, char *argv[]) dcmConnectionTimeout.set(OFstatic_cast(Sint32, opt_timeout)); } + if (cmd.findOption("--socket-timeout")) + app.checkValue(cmd.getValueAndCheckMin(opt_socket_timeout, -1)); + // always set the timeout values since the global default might be different + dcmSocketSendTimeout.set(OFstatic_cast(Sint32, opt_socket_timeout)); + dcmSocketReceiveTimeout.set(OFstatic_cast(Sint32, opt_socket_timeout)); + if (cmd.findOption("--acse-timeout")) { OFCmdSignedInt opt_timeout = 0; diff --git a/dcmnet/apps/findscu.cc b/dcmnet/apps/findscu.cc index d57b4986..307e69ad 100644 --- a/dcmnet/apps/findscu.cc +++ b/dcmnet/apps/findscu.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -19,17 +19,20 @@ * */ -#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmnet/dfindscu.h" #include "dcmtk/dcmnet/diutil.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/dcmdata/dcdict.h" -#include "dcmtk/dcmdata/dcostrmz.h" /* for dcmZlibCompressionLevel */ +#include "dcmtk/dcmdata/dcostrmz.h" /* for dcmZlibCompressionLevel */ #ifdef WITH_ZLIB -#include /* for zlibVersion() */ +#include /* for zlibVersion() */ +#endif +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION +#include "dcmtk/ofstd/ofchrenc.h" /* for OFCharacterEncoding */ #endif #ifdef WITH_OPENSSL @@ -61,7 +64,8 @@ int main(int argc, char *argv[]) OFCmdSignedInt opt_cancelAfterNResponses = -1; int opt_dimse_timeout = 0; int opt_outputResponsesToLogger = 0; - OFBool opt_extractResponsesToFile = OFFalse; + DcmFindSCUExtractMode opt_extractResponses = FEM_none; + OFString opt_extractXMLFilename; OFString opt_outputDirectory = "."; OFCmdUnsignedInt opt_maxReceivePDULength = ASC_DEFAULTMAXPDU; E_TransferSyntax opt_networkTransferSyntax = EXS_Unknown; @@ -212,14 +216,18 @@ int main(int argc, char *argv[]) cmd.addGroup("output options:"); cmd.addSubGroup("general:"); - cmd.addOption("--output-directory", "-od", 1, "[d]irectory: string (default: \".\")", "write output files to existing directory d"); + cmd.addOption("--output-directory", "-od", 1, "[d]irectory: string (default: \".\")", + "write output files to existing directory d"); cmd.addSubGroup("automatic data correction:"); cmd.addOption("--enable-correction", "+dc", "enable automatic data correction"); cmd.addOption("--disable-correction", "-dc", "disable automatic data correction (default)"); cmd.addSubGroup("C-FIND responses:"); cmd.addOption("--show-responses", "+sr", "always output responses to the logger"); cmd.addOption("--hide-responses", "-sr", "do not output responses to the logger"); - cmd.addOption("--extract", "-X", "extract responses to file (rsp0001.dcm, ...)"); + cmd.addOption("--extract", "-X", "extract responses to DICOM file (rsp0001.dcm...)"); + cmd.addOption("--extract-xml", "-Xx", "extract responses to XML file (rsp0001.xml...)"); + cmd.addOption("--extract-xml-single", "-Xs", 1, "[f]ilename: string", + "extract all responses to given XML file f"); /* evaluate command line */ prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION); @@ -232,7 +240,7 @@ int main(int argc, char *argv[]) { app.printHeader(OFTrue /*print host identifier*/); COUT << OFendl << "External libraries used:"; -#if !defined(WITH_ZLIB) && !defined(WITH_OPENSSL) +#if !defined(WITH_ZLIB) && !defined(WITH_OPENSSL) && !defined(DCMTK_ENABLE_CHARSET_CONVERSION) COUT << " none" << OFendl; #else COUT << OFendl; @@ -242,6 +250,9 @@ int main(int argc, char *argv[]) #endif #ifdef WITH_OPENSSL COUT << "- " << OPENSSL_VERSION_TEXT << OFendl; +#endif +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION + COUT << "- " << OFCharacterEncoding::getLibraryVersionString() << OFendl; #endif return 0; } @@ -336,7 +347,16 @@ int main(int argc, char *argv[]) if (cmd.findOption("--hide-responses")) opt_outputResponsesToLogger = 2; cmd.endOptionBlock(); - if (cmd.findOption("--extract")) opt_extractResponsesToFile = OFTrue; + cmd.beginOptionBlock(); + if (cmd.findOption("--extract")) opt_extractResponses = FEM_dicomFile; + if (cmd.findOption("--extract-xml")) opt_extractResponses = FEM_xmlFile; + if (cmd.findOption("--extract-xml-single")) + { + opt_extractResponses = FEM_singleXMLFile; + app.checkValue(cmd.getValue(opt_extractXMLFilename)); + } + cmd.endOptionBlock(); + /* finally parse filenames */ int paramCount = cmd.getParamCount(); const char *currentFilename = NULL; @@ -461,7 +481,7 @@ int main(int argc, char *argv[]) // default configuration for the C-FIND response logger if (!cmd.findOption("--log-config")) { - if (cmd.findOption("--extract")) + if (cmd.findOption("--extract") || cmd.findOption("--extract-xml") || cmd.findOption("--extract-xml-single")) { OFLog::getLogger(DCMNET_LOGGER_NAME ".responses").setLogLevel(OFLogger::OFF_LOG_LEVEL); } @@ -493,7 +513,7 @@ int main(int argc, char *argv[]) } /* make sure that output directory can be used (if needed) */ - if (opt_extractResponsesToFile) + if (opt_extractResponses != FEM_none) { if (!OFStandard::dirExists(opt_outputDirectory)) { @@ -615,12 +635,13 @@ int main(int argc, char *argv[]) opt_secureConnection, opt_abortAssociation, opt_repeatCount, - opt_extractResponsesToFile, + opt_extractResponses, opt_cancelAfterNResponses, &overrideKeys, NULL, /* we want to use the default callback */ &fileNameList, - opt_outputDirectory.c_str()); + opt_outputDirectory.c_str(), + opt_extractXMLFilename.c_str()); // destroy network structure cond = findscu.dropNetwork(); diff --git a/dcmnet/apps/storescu.cc b/dcmnet/apps/storescu.cc index f19ec5b4..8f7aba6f 100644 --- a/dcmnet/apps/storescu.cc +++ b/dcmnet/apps/storescu.cc @@ -1558,7 +1558,7 @@ storeSCU(T_ASC_Association *assoc, const char *fname) strcpy(req.AffectedSOPClassUID, sopClass); strcpy(req.AffectedSOPInstanceUID, sopInstance); req.DataSetType = DIMSE_DATASET_PRESENT; - req.Priority = DIMSE_PRIORITY_LOW; + req.Priority = DIMSE_PRIORITY_MEDIUM; /* if required, dump some more general information */ OFLOG_INFO(storescuLogger, "Sending Store Request (MsgID " << msgId << ", " diff --git a/dcmnet/docs/CMakeLists.txt b/dcmnet/docs/CMakeLists.txt index 44368c4b..3c49b425 100644 --- a/dcmnet/docs/CMakeLists.txt +++ b/dcmnet/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES asconfig.txt testing.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) +INSTALL(FILES asconfig.txt testing.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git a/dcmnet/docs/echoscu.man b/dcmnet/docs/echoscu.man index caf82dae..a296fd0b 100644 --- a/dcmnet/docs/echoscu.man +++ b/dcmnet/docs/echoscu.man @@ -80,6 +80,9 @@ other network options: -to --timeout [s]econds: integer (default: unlimited) timeout for connection requests + -ts --socket-timeout [s]econds: integer (default: 60) + timeout for network socket (0 for none) + -ta --acse-timeout [s]econds: integer (default: 30) timeout for ACSE messages diff --git a/dcmnet/docs/findscu.man b/dcmnet/docs/findscu.man index 06a035de..e46809ce 100644 --- a/dcmnet/docs/findscu.man +++ b/dcmnet/docs/findscu.man @@ -242,7 +242,13 @@ C-FIND responses: do not output responses to the logger -X --extract - extract responses to file (rsp0001.dcm, ...) + extract responses to DICOM file (rsp0001.dcm...) + + -Xx --extract-xml + extract responses to XML file (rsp0001.xml...) + + -Xs --extract-xml-single [f]ilename: string + extract all responses to given XML file f \endverbatim \section findscu_notes NOTES @@ -304,9 +310,22 @@ completely with one or more \e -k options. If multiple query files are provided, \b findscu will send multiple C-FIND requests to the SCP. Each set of response identifiers received will be output to the logger unless -option \e --hide-responses, \e --extract, \e --quiet or an appropriate logger -configuration is used. Option \e --show-responses can be used to force the -output to the logger. +option \e --hide-responses, any of the below \e --extract variants, \e --quiet +or an appropriate logger configuration is used. In such cases, the output to +the logger can be enforced with option \e --show-responses. + +In addition, the response datasets can also be extracted as individual DICOM +files (using option \e --extract) or XML files (using option \e --extract-xml). +The output format of the latter is described by the file dcm2xml.dtd +(starting with top-level element "data-set"). + +Alternatively, all response datasets of an association can be extracted to a +single XML file using option \e --extract-xml-single. The top-level element of +the XML document is "responses" (with a "type" attribute of "C-FIND"). The +individual datasets are stored as described above. If support for character set +conversion is enabled, UTF-8 encoding is used, i.e. all datasets are converted +to UTF-8 encoding (which is strongly recommended in order to avoid issues with +non-ASCII characters when different character sets are used). \subsection findscu_dicom_conformance DICOM Conformance @@ -395,12 +414,16 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. +\section findscu_files FILES + +\/dcm2xml.dtd - Document Type Definition (DTD) file + \section findscu_see_also SEE ALSO movescu(1), dump2dcm(1), dcmodify(1) \section findscu_copyright COPYRIGHT -Copyright (C) 1994-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1994-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff --git a/dcmnet/etc/CMakeLists.txt b/dcmnet/etc/CMakeLists.txt index 63b46caf..a46bec8f 100644 --- a/dcmnet/etc/CMakeLists.txt +++ b/dcmnet/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES storescp.cfg storescu.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc) +INSTALL(FILES storescp.cfg storescu.cfg DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/dcmtk" COMPONENT etc) diff --git a/dcmnet/etc/storescp.cfg b/dcmnet/etc/storescp.cfg index db537d84..84fd1663 100644 --- a/dcmnet/etc/storescp.cfg +++ b/dcmnet/etc/storescp.cfg @@ -223,6 +223,7 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib # - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage # - ParametricMapStorage # - PatientRadiationDoseSRStorage +# - ProtocolApprovalStorage # - RadiopharmaceuticalRadiationDoseSRStorage # - RTBrachyApplicationSetupDeliveryInstructionStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage @@ -250,7 +251,7 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib # Same as "GenericStorageSCP" but limited to non-retired and non-draft SOP Classes. # This allows for accepting (almost) all DICOM Storage SOP Classes that are currently # defined in the standard (an exception is made for some very new DICOM objects because -# of the limitation of 128 Presentation Contexts for SCPs, see DCMTK Feature # 540). +# of the limitation of 128 Presentation Contexts for SCPs, see DCMTK Feature #540). # PresentationContext1 = VerificationSOPClass\Uncompressed # @@ -395,6 +396,7 @@ PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage # - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage # - PatientRadiationDoseSRStorage +# - ProtocolApprovalStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - VolumeRenderingVolumetricPresentationStateStorage # diff --git a/dcmnet/etc/storescu.cfg b/dcmnet/etc/storescu.cfg index 929a7936..efd16da4 100644 --- a/dcmnet/etc/storescu.cfg +++ b/dcmnet/etc/storescu.cfg @@ -244,6 +244,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2 # - OphthalmicVisualFieldStaticPerimetryMeasurementsStorage # - ParametricMapStorage # - PatientRadiationDoseSRStorage +# - ProtocolApprovalStorage # - RadiopharmaceuticalRadiationDoseSRStorage # - RealWorldValueMappingStorage # - RespiratoryWaveformStorage diff --git a/dcmnet/include/CMakeLists.txt b/dcmnet/include/CMakeLists.txt index 806843cd..d5b2295e 100644 --- a/dcmnet/include/CMakeLists.txt +++ b/dcmnet/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmnet DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmnet DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmnet/include/dcmtk/dcmnet/cond.h b/dcmnet/include/dcmtk/dcmnet/cond.h index 3c46947d..a4a3d9c0 100644 --- a/dcmnet/include/dcmtk/dcmnet/cond.h +++ b/dcmnet/include/dcmtk/dcmnet/cond.h @@ -197,7 +197,7 @@ extern DCMTK_DCMNET_EXPORT const OFConditionConst NET_EC_SCPBusy; extern DCMTK_DCMNET_EXPORT const OFConditionConst NET_EC_CannotStartSCPThread; /* Cannot start SCP thread */ extern DCMTK_DCMNET_EXPORT const OFConditionConst NET_EC_StopAfterAssociation; /* Stop after current association (as requested) */ extern DCMTK_DCMNET_EXPORT const OFConditionConst NET_EC_StopAfterConnectionTimeout; /* Stop after TCP connection timeout (as requested) */ - +extern DCMTK_DCMNET_EXPORT const OFConditionConst NET_EC_InvalidSCPAssociationProfile; /* Invalid or non-existing SCP Association Profile */ // This macro creates a condition with given code, severity and text. // Making this a macro instead of a function saves the creation of a temporary. diff --git a/dcmnet/include/dcmtk/dcmnet/dcmlayer.h b/dcmnet/include/dcmtk/dcmnet/dcmlayer.h index e6591e1d..59854fb2 100644 --- a/dcmnet/include/dcmtk/dcmnet/dcmlayer.h +++ b/dcmnet/include/dcmtk/dcmnet/dcmlayer.h @@ -30,6 +30,7 @@ #define INCLUDE_UNISTD #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofutil.h" #include "dcmtk/dcmnet/dndefine.h" #include "dcmtk/dcmnet/dntypes.h" @@ -72,12 +73,29 @@ class DCMTK_DCMNET_EXPORT DcmTransportLayer { public: + /** constructor. + */ + DcmTransportLayer() { /* empty */ } + /** constructor. * #param networkRole network role to be used by the application, influences * the choice of the secure transport layer code. */ DcmTransportLayer(int /* networkRole */ ) { /* empty */ } + /** move constructor. + * @param rhs an rvalue reference to another DcmTransportLayer object that + * will be moved. + */ + DcmTransportLayer(OFrvalue_ref(DcmTransportLayer) rhs) { OFstatic_cast(void, rhs); } + + /** move assignment. + * @param rhs an rvalue reference to another DcmTransportLayer object that will + * be move assigned. + * @return *this. + */ + DcmTransportLayer& operator=(OFrvalue_ref(DcmTransportLayer) rhs) { OFstatic_cast(void, rhs); return *this; } + /// destructor virtual ~DcmTransportLayer(); diff --git a/dcmnet/include/dcmtk/dcmnet/dcompat.h b/dcmnet/include/dcmtk/dcmnet/dcompat.h index e9112be5..267c18dd 100644 --- a/dcmnet/include/dcmtk/dcmnet/dcompat.h +++ b/dcmnet/include/dcmtk/dcmnet/dcompat.h @@ -92,7 +92,9 @@ #include "dcmtk/ofstd/ofstdinc.h" #ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include /* for Windows defines */ #elif defined(HAVE_WINSOCK_H) #include /* include winsock.h directly i.e. on MacOS */ @@ -192,10 +194,14 @@ BEGIN_EXTERN_C DCMTK_DCMNET_EXPORT int gethostname(char* name, int namelen); END_EXTERN_C #else -/* define gethostname ourselves */ +#ifndef __MINGW32__ +/* define gethostname ourselves (except on MinGW, where this is defined + in a Windows specific header +*/ DCMTK_DCMNET_EXPORT int gethostname(char* name, int namelen); #endif #endif +#endif #ifndef HAVE_PROTOTYPE_GETSOCKOPT #ifdef HAVE_GETSOCKOPT diff --git a/dcmnet/include/dcmtk/dcmnet/dfindscu.h b/dcmnet/include/dcmtk/dcmnet/dfindscu.h index 7b9dfd8f..02bfad97 100644 --- a/dcmnet/include/dcmtk/dcmnet/dfindscu.h +++ b/dcmnet/include/dcmtk/dcmnet/dfindscu.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2015, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -36,6 +36,35 @@ struct T_ASC_Parameters; struct T_DIMSE_C_FindRQ; struct T_DIMSE_C_FindRSP; + +// include this file in doxygen documentation + +/** @file dfindscu.h + * @brief Service Class User (SCU) for C-FIND + */ + + +/** mode specifying whether and how to extract C-FIND responses + */ +enum DcmFindSCUExtractMode +{ + /// do not extract C-FIND responses to file + FEM_none, + /// extract each C-FIND-RSP dataset to a DICOM file + FEM_dicomFile, + /// extract each C-FIND-RSP dataset to an XML file. + /// See "dcm2xml.dtd" for XML format (starts with top-level element "data-set"). + /// The DICOM specific character set is mapped to an appropriate XML encoding + /// (if possible), i.e. no character set conversion takes place. + FEM_xmlFile, + /// extract all C-FIND-RSP datasets to a single XML file. + /// The top-level element of the XML document is "responses". If support for + /// character set conversion is enabled, UTF-8 encoding is used, i.e. all + /// datasets are converted to UTF-8 encoding (which is strongly recommended). + FEM_singleXMLFile +}; + + /** Abstract base class for Find SCU callbacks. During a C-FIND operation, the * callback() method of a callback handler object derived from this class is * called once for each incoming C-FIND-RSP message. The callback method has @@ -109,17 +138,21 @@ private: class DCMTK_DCMNET_EXPORT DcmFindSCUDefaultCallback: public DcmFindSCUCallback { public: + /** constructor - * @param extractResponsesToFile if true, C-FIND-RSP datasets will be stored as DICOM files + * @param extractResponses mode specifying whether and how to extract C-FIND responses * @param cancelAfterNResponses if non-negative, a C-FIND-CANCEL will be issued after the * given number of incoming C-FIND-RSP messages - * @param outputDirectory directory used to store the output files (e.g. response messages). + * @param outputDirectory directory used to store the output files (e.g. response datasets). * If NULL, the current directory is used. + * @param outputStream pointer to output stream that is used when extractResponses is set + * to FEM_singleXMLFile */ DcmFindSCUDefaultCallback( - OFBool extractResponsesToFile, + DcmFindSCUExtractMode extractResponses, int cancelAfterNResponses, - const char *outputDirectory = NULL); + const char *outputDirectory = NULL, + STD_NAMESPACE ofstream *outputStream = NULL); /// destructor virtual ~DcmFindSCUDefaultCallback() {} @@ -138,21 +171,24 @@ public: private: - /// if true, C-FIND-RSP datasets will be stored as DICOM files - OFBool extractResponsesToFile_; + /// mode specifying whether and how to extract C-FIND responses + DcmFindSCUExtractMode extractResponses_; /// if non-negative, a C-FIND-CANCEL will be issued after the given number of incoming C-FIND-RSP messages int cancelAfterNResponses_; - /// directory used to store the output files (e.g. response messages) + /// directory used to store the output files (e.g. response datasets) OFString outputDirectory_; + + /// pointer to output stream that is used when extractResponses_ is FEM_singleXMLFile + STD_NAMESPACE ofstream *outputStream_; }; /** This class implements a complete DICOM C-FIND SCU, including association set-up, execution of the * C-FIND transaction including processing of results, and closing of the association. By default, - * incoming C-FIND-RSP messages will be displayed on console and, optionally, also stored in files. - * By providing a user-defined callback, other types of processing are possible. + * incoming C-FIND-RSP messages will be displayed on console and, optionally, the attached dataset + * is stored in files. By providing a user-defined callback, other types of processing are possible. */ class DCMTK_DCMNET_EXPORT DcmFindSCU { @@ -213,7 +249,7 @@ public: * @param abortAssociation abort association instead of releasing it (for debugging purposes) * @param repeatCount number of times this query should be repeated * (for debugging purposes, works only with default callback) - * @param extractResponsesToFile if true, extract incoming response messages to file + * @param extractResponses mode specifying whether and how to extract C-FIND responses * (works only with default callback) * @param cancelAfterNResponses issue C-FIND-CANCEL after given number of responses * (works only with default callback) @@ -225,8 +261,10 @@ public: * @param fileNameList list of query files. Each file is expected to be a DICOM file * containing a dataset that is used as a query, possibly modified by override keys, if any. * This parameter, if non-NULL, points to a list of filenames (paths). - * @param outputDirectory directory used to store the output files (e.g. response messages). + * @param outputDirectory directory used to store the output files (e.g. response datasets). * If NULL, the current directory is used. + * @param extractFilename filename used to store the response datasets when extractResponses is + * set to FEM_singleXMLFile * @return EC_Normal if successful, an error code otherwise */ OFCondition performQuery( @@ -242,12 +280,13 @@ public: OFBool secureConnection, OFBool abortAssociation, unsigned int repeatCount, - OFBool extractResponsesToFile, + DcmFindSCUExtractMode extractResponses, int cancelAfterNResponses, OFList *overrideKeys, DcmFindSCUCallback *callback = NULL, OFList *fileNameList = NULL, - const char *outputDirectory = NULL); + const char *outputDirectory = NULL, + const char *extractFilename = NULL); /** static helper function that writes the content of the given dataset * into a DICOM file (using the DICOM file format with metaheader). @@ -259,6 +298,15 @@ public: */ static OFBool writeToFile(const char* ofname, DcmDataset *dataset); + /** static helper function that writes the content of the given dataset into + * an XML file (see "dcm2xml.dtd", starts with top-level element "data-set"). + * This method also tries to determine the character encoding of the dataset. + * @param ofname filename to write + * @param dataset dataset to store in file + * @return EC_Normal if successful, an error code otherwise + */ + static OFBool writeToXMLFile(const char* ofname, DcmDataset *dataset); + private: /** add presentation context for given abstract syntax and given preferred transfer syntax @@ -285,7 +333,7 @@ private: * @param abstractSyntax SOP Class UID or Meta SOP Class UID of service * @param blockMode DIMSE blocking mode * @param dimse_timeout timeout for DIMSE operations (in seconds) - * @param extractResponsesToFile if true, extract incoming response messages to file + * @param extractResponses mode specifying whether and how to extract C-FIND responses * (works only with default callback) * @param cancelAfterNResponses issue C-FIND-CANCEL after given number of responses * (works only with default callback) @@ -294,8 +342,10 @@ private: * the query dataset will be empty otherwise. For path syntax see DcmPath. * @param callback user-provided non-default callback handler object. * For default callback, pass NULL. - * @param outputDirectory directory used to store the output files (e.g. response messages). + * @param outputDirectory directory used to store the output files (e.g. response datasets). * If NULL, the current directory is used. + * @param outputStream pointer to output stream that is used when extractResponses is set + * to FEM_singleXMLFile * @return EC_Normal if successful, an error code otherwise */ OFCondition findSCU( @@ -305,11 +355,12 @@ private: const char *abstractSyntax, T_DIMSE_BlockingMode blockMode, int dimse_timeout, - OFBool extractResponsesToFile, + DcmFindSCUExtractMode extractResponses, int cancelAfterNResponses, OFList *overrideKeys, DcmFindSCUCallback *callback = NULL, - const char *outputDirectory = NULL) const; + const char *outputDirectory = NULL, + STD_NAMESPACE ofstream *outputStream = NULL) const; /// Private undefined copy constructor DcmFindSCU(const DcmFindSCU& other); diff --git a/dcmnet/include/dcmtk/dcmnet/dul.h b/dcmnet/include/dcmtk/dcmnet/dul.h index 3f1ea79e..271b990b 100644 --- a/dcmnet/include/dcmtk/dcmnet/dul.h +++ b/dcmnet/include/dcmtk/dcmnet/dul.h @@ -384,7 +384,7 @@ typedef enum { */ #define DUL_DULCOMPAT 2768240730UL -#define DUL_DIMSECOMPAT 786432UL +#define DUL_DIMSECOMPAT 851968UL #define DUL_MAXPDUCOMPAT 4278190335UL /* Define the function prototypes for this facility. diff --git a/dcmnet/include/dcmtk/dcmnet/scp.h b/dcmnet/include/dcmtk/dcmnet/scp.h index 224163b6..fcb80ffc 100644 --- a/dcmnet/include/dcmtk/dcmnet/scp.h +++ b/dcmnet/include/dcmtk/dcmnet/scp.h @@ -83,6 +83,8 @@ enum DcmRefuseReasonType DCMSCP_CANNOT_FORK, /// Refusing association because of bad application context name DCMSCP_BAD_APPLICATION_CONTEXT_NAME, + /// Refusing association because of disallowed connecting host + DCMSCP_CALLING_HOST_NOT_ALLOWED, /// Refusing association because of unaccepted called AE title DCMSCP_CALLED_AE_TITLE_NOT_RECOGNIZED, /// Refusing association because of unaccepted calling AE title @@ -128,10 +130,15 @@ struct DCMTK_DCMNET_EXPORT DcmPresentationContextInfo /** Base class for implementing a DICOM Service Class Provider (SCP). Derived classes can * add the presentation contexts they want to support, set further parameters (port, peer - * hostname, etc. as desired) and then call DcmSCP's listen() method to start the server. + * host name, etc. as desired) and then call DcmSCP's listen() method to start the server. * For incoming associations and DIMSE messages, a derived class can define the behavior - * of the server. The DcmSCP base class is capable of responding to C-ECHO requests - * (Verification SOP Class). + * of the server. + * The DcmSCP base class does not support any presentation contexts per default. + * In particular the Verification SOP class which every SCP must support, + * is not added automatically in order to give the user full control over the + * supported list of presentation contexts. However, if this class should negotiate + * Verification, call setEnableVerification(). In that case DcmSCP will also + * respond to related C-ECHO requests. Note that this cannot be reverted. * @warning This class is EXPERIMENTAL. Be careful to use it in production environment. */ class DCMTK_DCMNET_EXPORT DcmSCP @@ -159,6 +166,19 @@ public: * be used to return after an association has been handled and ended. * In that case, NET_EC_StopAfterAssociation is returned. * + * Other error codes include + *
    + *
  • NET_EC_InvalidSCPAssociationProfile: Returned if the SCP's presentation + * context information is invalid (e.g. no presentation contexts have + * been added). + *
  • + *
  • NET_EC_InsufficientPortPrivileges: Returned if the SCP is not + * allowed to open the specified TCP port for listening. The reason + * may be that you try to open a port number below 1024 on a Unix-like + * system as non-root user. + *
  • EC_setuidFailed: Returned (on Unix-like systems) if the DcmSCP + * was not able to drop root privileges. + *
*/ virtual OFCondition listen(); @@ -166,6 +186,21 @@ public: /* Set methods for configuring SCP behavior */ /* ************************************************************* */ + /** Enables negotiation of the Verification SOP Class. It adds the Verification + * SOP Class to the list of supported abstract syntaxes for the given profile. + * All uncompressed transfer syntaxes are supported. If Verification SOP + * class is added here, DcmSCP will respond to related C-ECHO requests. Note + * that this cannot be reverted. + * The default behavior of DcmSCP is not to support any SOP Class at all. + * @param profile [in] The profile Verification SOP Class should + * be added to. The default is to add it to the + * DcmSCP's internal standard profile called + * "DEFAULT". + * @return EC_Normal if Verification SOP Class could be added, + * error otherwise. + */ + OFCondition setEnableVerification(const OFString& profile="DEFAULT"); + /** Add abstract syntax to presentation contexts the SCP is able to negotiate with SCUs. * @param abstractSyntax [in] The UID of the abstract syntax (e.g.\ SOP class) to add * @param xferSyntaxes [in] List of transfer syntaxes (UIDs) that should be supported @@ -288,7 +323,7 @@ public: /** Enables or disables looking up the host name from a connecting system. * Note that this sets a GLOBAL flag in DCMTK, i.e. the behavior changes * for all servers. This should be changed in the future. - * @param mode [in] OFTrue, if hostname lookup should be enabled, OFFalse for disabling it. + * @param mode [in] OFTrue, if host name lookup should be enabled, OFFalse for disabling it. */ void setHostLookupEnabled(const OFBool mode); @@ -375,7 +410,7 @@ public: OFBool getVerbosePCMode() const; /** Returns whether a connecting system's host name is looked up. - * @return OFTrue, if hostname lookup is enabled, OFFalse otherwise + * @return OFTrue, if host name lookup is enabled, OFFalse otherwise */ OFBool getHostLookupEnabled() const; @@ -443,7 +478,7 @@ public: */ Uint32 getPeerMaxPDULength() const; - // DcmThreadSCP needs access to configuration (m_cfg), at least + /// DcmThreadSCP needs access to configuration (m_cfg), at least friend class DcmThreadSCP; protected: @@ -475,9 +510,11 @@ protected: /* *********************************************************************** */ /** Handle incoming command set and react accordingly, e.g.\ sending response via - * DIMSE_sendXXXResponse(). The standard handler only knows how to handle an Echo request - * by calling handleEchoRequest(). This function is most likely to be implemented by a - * derived class implementing a specific SCP behavior. + * DIMSE_sendXXXResponse(). The standard handler only knows how to handle + * a C-ECHO request message (by calling handleEchoRequest()) if it is sent on a + * presentation context configured for the Verification SOP Class. + * This function is most likely to be implemented by a derived class + * implementing a specific SCP behavior. * @param incomingMsg The DIMSE message received * @param presInfo Additional information on the Presentation Context used * @return EC_Normal if the message could be handled, error if not. Especially @@ -517,9 +554,8 @@ protected: */ virtual OFBool checkCallingAETitleAccepted(const OFString& callingAE); - /** Overwrite this function if calling IP should undergo checking. Note - * that this function may also return a hostname instead. If - * OFTrue is returned, the IP is accepted and processing is continued. + /** Overwrite this function if calling IP / host name should undergo checking. + * If OFTrue is returned, the host is accepted and processing is continued. * In case of OFFalse, the SCP will refuse the incoming association with * an error. The standard handler always returns OFTrue. * @param hostOrIP The IP of the client to check. diff --git a/dcmnet/include/dcmtk/dcmnet/scpcfg.h b/dcmnet/include/dcmtk/dcmnet/scpcfg.h index 972ca0e1..bce3c364 100644 --- a/dcmnet/include/dcmtk/dcmnet/scpcfg.h +++ b/dcmnet/include/dcmtk/dcmnet/scpcfg.h @@ -34,7 +34,8 @@ * the DIMSE timeout. The configuration, however, is not updated to reflect * any runtime connection information, e.g. information about the current * SCU connected or the like. - * + * The presentation context configuration is held in profiles. Per default, the + * name of the active association configuration is DEFAULT. */ class DCMTK_DCMNET_EXPORT DcmSCPConfig { @@ -121,6 +122,19 @@ public: */ OFCondition setAndCheckAssociationProfile(const OFString &profileName); + /** Returns the name of the currently active association profile + * @return The name of the association profile that is currently active + */ + OFString getActiveAssociationProfile() const; + + /** The profile with the given name is checked for validity using this method. + * @param profileName [in] The name of the association profile which should be checked + * @param mangledName [out] The mangled profile name + * @return EC_Normal if profile is a valid SCP profile, error otherwise + */ + OFCondition checkAssociationProfile(const OFString &profileName, + OFString& mangledName) const; + /** Force every association request to be refused by SCP, no matter what the SCU is * offering * @param doRefuse [in] If OFTrue, every association is being refused. DcmSCP's default @@ -182,7 +196,7 @@ public: /** Enables or disables looking up the host name from a connecting system. * Note that this sets a GLOBAL flag in DCMTK, i.e. the behavior changes * for all servers. This should be changed in the future. - * @param mode [in] OFTrue, if hostname lookup should be enabled, + * @param mode [in] OFTrue, if host name lookup should be enabled, * OFFalse for disabling it. */ void setHostLookupEnabled(const OFBool mode); @@ -270,7 +284,7 @@ public: OFBool getVerbosePCMode() const; /** Returns whether a connecting system's host name is looked up. - * @return OFTrue, if hostname lookup is enabled, OFFalse otherwise + * @return OFTrue, if host name lookup is enabled, OFFalse otherwise */ OFBool getHostLookupEnabled() const; diff --git a/dcmnet/include/dcmtk/dcmnet/scu.h b/dcmnet/include/dcmtk/dcmnet/scu.h index 26d8ff55..815f2545 100644 --- a/dcmnet/include/dcmtk/dcmnet/scu.h +++ b/dcmnet/include/dcmtk/dcmnet/scu.h @@ -595,7 +595,7 @@ public: */ void setAETitle(const OFString &myAETtitle); - /** Set SCP's host (hostname or IP address) to talk to in association negotiation + /** Set SCP's host (host name or IP address) to talk to in association negotiation * @param peerHostName [in] The SCP's hostname or IP address to be used */ void setPeerHostName(const OFString &peerHostName); @@ -698,8 +698,8 @@ public: */ const OFString &getAETitle() const; - /** Returns the SCP's (peer's) host name configured - * @return The hostname (or IP) configured to be talked to + /** Returns the SCP's (peer's) host configured + * @return The host name (or IP) configured to be talked to */ const OFString &getPeerHostName() const; @@ -1031,7 +1031,7 @@ private: /// AE title of this application (default: ANY-SCU) OFString m_ourAETitle; - /// Peer hostname + /// Peer host (IP or host name) OFString m_peer; /// AE title of remote application (default: ANY-SCP) diff --git a/dcmnet/libsrc/Makefile.dep b/dcmnet/libsrc/Makefile.dep index 4ba4bbb3..9b666500 100644 --- a/dcmnet/libsrc/Makefile.dep +++ b/dcmnet/libsrc/Makefile.dep @@ -399,6 +399,9 @@ dcmlayer.o: dcmlayer.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dntypes.h \ ../include/dcmtk/dcmnet/dcmtrans.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -414,8 +417,12 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dndefine.h \ - ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dcompat.h \ + ../include/dcmtk/dcmnet/dcmlayer.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ ../include/dcmtk/dcmnet/cond.h \ @@ -436,9 +443,6 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -670,7 +674,8 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcpath.h + ../../dcmdata/include/dcmtk/dcmdata/dcpath.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ @@ -1698,8 +1703,7 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ ../include/dcmtk/dcmnet/assoc.h dulstruc.h dulpriv.h dulfsm.h \ - ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \ - ../../ofstd/include/dcmtk/ofstd/ofnetdb.h + ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ @@ -1903,7 +1907,7 @@ dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h \ - ../../ofstd/include/dcmtk/ofstd/ofnetdb.h + ../../ofstd/include/dcmtk/ofstd/ofsockad.h dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ diff --git a/dcmnet/libsrc/assoc.cc b/dcmnet/libsrc/assoc.cc index 6d2c4789..daba0b83 100644 --- a/dcmnet/libsrc/assoc.cc +++ b/dcmnet/libsrc/assoc.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -115,6 +115,9 @@ #ifdef HAVE_SYS_SELECT_H #include #endif +#ifdef DCMTK_HAVE_POLL +#include +#endif #include "dcmtk/dcmnet/dicom.h" #include "dcmtk/dcmnet/cond.h" @@ -1700,7 +1703,6 @@ ASC_associationWaiting(T_ASC_Network * network, int timeout) int s; #endif struct timeval t; - fd_set fdset; int nfound; if (network == NULL) return OFFalse; @@ -1714,21 +1716,33 @@ ASC_associationWaiting(T_ASC_Network * network, int timeout) return OFFalse; #endif +#ifndef DCMTK_HAVE_POLL + fd_set fdset; FD_ZERO(&fdset); #ifdef __MINGW32__ // on MinGW, FD_SET expects an unsigned first argument FD_SET((unsigned int) s, &fdset); #else FD_SET(s, &fdset); -#endif +#endif /* __MINGW32__ */ +#endif /* DCMTK_HAVE_POLL */ t.tv_sec = timeout; t.tv_usec = 0; + +#ifdef DCMTK_HAVE_POLL + struct pollfd pfd[] = + { + { s, POLLIN, 0 } + }; + nfound = poll(pfd, 1, t.tv_sec*1000+(t.tv_usec/1000)); +#else #ifdef HAVE_INTP_SELECT nfound = select(OFstatic_cast(int, s + 1), (int *)(&fdset), NULL, NULL, &t); #else // the typecast is safe because Windows ignores the first select() parameter anyway nfound = select(OFstatic_cast(int, s + 1), &fdset, NULL, NULL, &t); -#endif +#endif /* HAVE_INTP_SELECT */ +#endif /* DCMTK_HAVE_POLL */ if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { DU_logSelectResult(nfound); diff --git a/dcmnet/libsrc/cond.cc b/dcmnet/libsrc/cond.cc index 7fb13a3a..437d2627 100644 --- a/dcmnet/libsrc/cond.cc +++ b/dcmnet/libsrc/cond.cc @@ -90,6 +90,7 @@ makeOFConditionConst(NET_EC_SCPBusy, OFM_dcmnet, 1074, O makeOFConditionConst(NET_EC_CannotStartSCPThread, OFM_dcmnet, 1075, OF_error, "Cannot start SCP Thread"); makeOFConditionConst(NET_EC_StopAfterAssociation, OFM_dcmnet, 1076, OF_ok, "Stop after current association (as requested)"); makeOFConditionConst(NET_EC_StopAfterConnectionTimeout, OFM_dcmnet, 1077, OF_ok, "Stop after TCP connection timeout (as requested)"); +makeOFConditionConst(NET_EC_InvalidSCPAssociationProfile, OFM_dcmnet, 1078, OF_error, "Invalid or non-existing SCP Association Profile"); OFString& DimseCondition::dump(OFString& str, OFCondition cond) diff --git a/dcmnet/libsrc/dcmtrans.cc b/dcmnet/libsrc/dcmtrans.cc index 32eead6f..128aba1c 100644 --- a/dcmnet/libsrc/dcmtrans.cc +++ b/dcmnet/libsrc/dcmtrans.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2017, OFFIS e.V. + * Copyright (C) 1998-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -52,6 +52,10 @@ BEGIN_EXTERN_C #endif END_EXTERN_C +#ifdef DCMTK_HAVE_POLL +#include +#endif + /* platform independent definition of EINTR */ enum { @@ -193,8 +197,10 @@ OFBool DcmTransportConnection::fastSelectReadableAssociation(DcmTransportConnect int i=0; struct timeval t; +#ifndef DCMTK_HAVE_POLL fd_set fdset; FD_ZERO(&fdset); +#endif OFTimer timer; int lTimeout = timeout; @@ -203,17 +209,24 @@ OFBool DcmTransportConnection::fastSelectReadableAssociation(DcmTransportConnect if (connections[i]) { socketfd = connections[i]->getSocket(); +#ifndef DCMTK_HAVE_POLL #ifdef __MINGW32__ /* on MinGW, FD_SET expects an unsigned first argument */ FD_SET((unsigned int)socketfd, &fdset); #else FD_SET(socketfd, &fdset); -#endif - +#endif /* __MINGW32__ */ +#endif /* DCMTK_HAVE_POLL */ if (socketfd > maxsocketfd) maxsocketfd = socketfd; } } +#ifdef DCMTK_HAVE_POLL + struct pollfd pfd[] = { + { maxsocketfd, POLLIN, 0 } + }; +#endif + OFBool done = OFFalse; while (!done) { @@ -222,12 +235,16 @@ OFBool DcmTransportConnection::fastSelectReadableAssociation(DcmTransportConnect t.tv_sec = lTimeout; t.tv_usec = 0; +#ifdef DCMTK_HAVE_POLL + int nfound = poll(pfd, 1, t.tv_sec*1000+(t.tv_usec/1000)); +#else /* DCMTK_HAVE_POLL */ #ifdef HAVE_INTP_SELECT int nfound = select(OFstatic_cast(int, maxsocketfd + 1), (int *)(&fdset), NULL, NULL, &t); -#else +#else /* HAVE_INTP_SELECT */ // This is safe because on Win32 the first parameter of select() is ignored anyway int nfound = select(OFstatic_cast(int, maxsocketfd + 1), &fdset, NULL, NULL, &t); -#endif +#endif /* HAVE_INTP_SELECT */ +#endif /* DCMTK_HAVE_POLL */ if (nfound == 0) return OFFalse; // a regular timeout else if (nfound > 0) done = OFTrue; // data available for reading @@ -256,8 +273,16 @@ OFBool DcmTransportConnection::fastSelectReadableAssociation(DcmTransportConnect if (connections[i]) { socketfd = connections[i]->getSocket(); +#ifdef DCMTK_HAVE_POLL + pfd[0].fd = socketfd; + pfd[0].events = POLLIN; + pfd[0].revents = 0; + poll(pfd, 1, 0); + if(!(pfd[0].revents & POLLIN)) connections[i] = NULL; +#else /* if not available, set entry in array to NULL */ if (!FD_ISSET(socketfd, &fdset)) connections[i] = NULL; +#endif } } return OFTrue; @@ -353,11 +378,12 @@ unsigned long DcmTCPConnection::getPeerCertificate(void * /* buf */ , unsigned l OFBool DcmTCPConnection::networkDataAvailable(int timeout) { struct timeval t; - fd_set fdset; int nfound; OFTimer timer; int lTimeout = timeout; +#ifndef DCMTK_HAVE_POLL + fd_set fdset; FD_ZERO(&fdset); #ifdef __MINGW32__ @@ -365,7 +391,8 @@ OFBool DcmTCPConnection::networkDataAvailable(int timeout) FD_SET((unsigned int) getSocket(), &fdset); #else FD_SET(getSocket(), &fdset); -#endif +#endif /* __MINGW32__ */ +#endif /* DCMTK_HAVE_POLL */ while (1) { @@ -374,12 +401,20 @@ OFBool DcmTCPConnection::networkDataAvailable(int timeout) t.tv_sec = lTimeout; t.tv_usec = 0; +#ifdef DCMTK_HAVE_POLL + struct pollfd pfd[] = + { + { getSocket(), POLLIN, 0 } + }; + nfound = poll(pfd, 1, t.tv_sec*1000+(t.tv_usec/1000)); +#else #ifdef HAVE_INTP_SELECT nfound = select(OFstatic_cast(int, getSocket() + 1), (int *)(&fdset), NULL, NULL, &t); #else // This is safe because on Win32 the first parameter of select() is ignored anyway nfound = select(OFstatic_cast(int, getSocket() + 1), &fdset, NULL, NULL, &t); -#endif +#endif /* HAVE_INTP_SELECT */ +#endif /* DCMTK_HAVE_POLL */ if (nfound < 0) { @@ -405,7 +440,11 @@ OFBool DcmTCPConnection::networkDataAvailable(int timeout) } else { +#ifdef DCMTK_HAVE_POLL + if (pfd[0].revents & POLLIN) return OFTrue; +#else if (FD_ISSET(getSocket(), &fdset)) return OFTrue; +#endif else return OFFalse; /* This should not really happen */ } } diff --git a/dcmnet/libsrc/dfindscu.cc b/dcmnet/libsrc/dfindscu.cc index e6280eca..96164485 100644 --- a/dcmnet/libsrc/dfindscu.cc +++ b/dcmnet/libsrc/dfindscu.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -34,7 +34,9 @@ #include "dcmtk/dcmdata/dcdicent.h" #include "dcmtk/dcmdata/dcdict.h" #include "dcmtk/dcmdata/dcpath.h" +#include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/ofstd/ofconapp.h" +#include "dcmtk/ofstd/ofstream.h" /* ---------------- static functions ---------------- */ @@ -72,13 +74,15 @@ void DcmFindSCUCallback::setPresentationContextID(T_ASC_PresentationContextID pr /* ---------------- class DcmFindSCUCallback ---------------- */ DcmFindSCUDefaultCallback::DcmFindSCUDefaultCallback( - OFBool extractResponsesToFile, + DcmFindSCUExtractMode extractResponses, int cancelAfterNResponses, - const char *outputDirectory) + const char *outputDirectory, + STD_NAMESPACE ofstream *outputStream) : DcmFindSCUCallback() -, extractResponsesToFile_(extractResponsesToFile) +, extractResponses_(extractResponses) , cancelAfterNResponses_(cancelAfterNResponses) , outputDirectory_(OFSTRING_GUARD(outputDirectory)) +, outputStream_(outputStream) { } @@ -90,7 +94,8 @@ void DcmFindSCUDefaultCallback::callback( { OFLogger rspLogger = OFLog::getLogger(DCMNET_LOGGER_NAME ".responses"); /* check whether debug mode is enabled */ - if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { + if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) + { OFString temp_str; DCMNET_INFO("Received Find Response " << responseCount); DCMNET_DEBUG(DIMSE_dumpMessage(temp_str, *rsp, DIMSE_INCOMING)); @@ -99,7 +104,8 @@ void DcmFindSCUDefaultCallback::callback( } } /* otherwise check whether special response logger is enabled */ - else if (rspLogger.isEnabledFor(OFLogger::INFO_LOG_LEVEL)) { + else if (rspLogger.isEnabledFor(OFLogger::INFO_LOG_LEVEL)) + { OFLOG_INFO(rspLogger, "---------------------------"); OFLOG_INFO(rspLogger, "Find Response: " << responseCount << " (" << DU_cfindStatusString(rsp->DimseStatus) << ")"); OFLOG_INFO(rspLogger, DcmObject::PrintHelper(*responseIdentifiers)); @@ -107,15 +113,58 @@ void DcmFindSCUDefaultCallback::callback( DCMNET_INFO("Received Find Response " << responseCount << " (" << DU_cfindStatusString(rsp->DimseStatus) << ")"); } - /* in case extractResponsesToFile is set the responses shall be extracted to a certain file */ - if (extractResponsesToFile_) { + /* should we extract the response dataset to a DICOM file? */ + if (extractResponses_ == FEM_dicomFile) + { OFString outputFilename; - char rspIdsFileName[1024]; + char rspIdsFileName[16]; sprintf(rspIdsFileName, "rsp%04d.dcm", responseCount); OFStandard::combineDirAndFilename(outputFilename, outputDirectory_, rspIdsFileName, OFTrue /*allowEmptyDirName*/); - DCMNET_INFO("Writing response message to file: " << outputFilename); + DCMNET_INFO("Writing response dataset to file: " << outputFilename); DcmFindSCU::writeToFile(outputFilename.c_str(), responseIdentifiers); } + /* ... or to an XML file? */ + else if (extractResponses_ == FEM_xmlFile) + { + OFString outputFilename; + char rspIdsFileName[16]; + sprintf(rspIdsFileName, "rsp%04d.xml", responseCount); + OFStandard::combineDirAndFilename(outputFilename, outputDirectory_, rspIdsFileName, OFTrue /*allowEmptyDirName*/); + DCMNET_INFO("Writing response dataset to file: " << outputFilename); + DcmFindSCU::writeToXMLFile(outputFilename.c_str(), responseIdentifiers); + } + /* ... or all responses to a single XML file? */ + else if (extractResponses_ == FEM_singleXMLFile) + { + if (outputStream_ != NULL) + { + OFCondition cond = EC_Normal; + size_t writeFlags = 0; + DCMNET_DEBUG("Writing response dataset to XML file"); + /* expect that (0008,0005) is set if extended characters are used */ + if (responseIdentifiers->tagExistsWithValue(DCM_SpecificCharacterSet)) + { +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION + DCMNET_DEBUG("Converting all element values that are affected by SpecificCharacterSet (0008,0005) to UTF-8"); + cond = responseIdentifiers->convertToUTF8(); +#else + if (responseIdentifiers->containsExtendedCharacters(OFFalse /*checkAllStrings*/)) + { + DCMNET_WARN("No support for character set conversion available ... quoting non-ASCII characters"); + /* make sure that non-ASCII characters are quoted appropriately */ + writeFlags |= DCMTypes::XF_convertNonASCII; + } else { + DCMNET_DEBUG("No support for character set conversion available"); + } +#endif + } + /* write response dataset to XML file */ + if (cond.good()) + cond = responseIdentifiers->writeXML(*outputStream_, writeFlags); + if (cond.bad()) + DCMNET_ERROR("Writing XML file: " << cond.text()); + } + } /* should we send a cancel back ?? */ if (cancelAfterNResponses_ == responseCount) @@ -172,24 +221,38 @@ OFCondition DcmFindSCU::performQuery( OFBool secureConnection, OFBool abortAssociation, unsigned int repeatCount, - OFBool extractResponsesToFile, + DcmFindSCUExtractMode extractResponses, int cancelAfterNResponses, OFList *overrideKeys, DcmFindSCUCallback *callback, OFList *fileNameList, - const char *outputDirectory) + const char *outputDirectory, + const char *extractFilename) { T_ASC_Association *assoc = NULL; T_ASC_Parameters *params = NULL; DIC_NODENAME peerHost; OFString temp_str; + OFString outputFilename; + STD_NAMESPACE ofstream outputStream; + + /* check input parameters first */ + if (extractResponses == FEM_singleXMLFile) + { + OFStandard::combineDirAndFilename(outputFilename, OFSTRING_GUARD(outputDirectory), OFSTRING_GUARD(extractFilename), OFTrue /*allowEmptyDirName*/); + if (outputFilename.empty()) + { + DCMNET_ERROR("Cannot create response file with empty filename"); + return EC_InvalidFilename; + } + } /* initialize association parameters, i.e. create an instance of T_ASC_Parameters*. */ OFCondition cond = ASC_createAssociationParameters(¶ms, maxReceivePDULength); if (cond.bad()) return cond; /* sets this application's title and the called application's title in the params */ - /* structure. The default values to be set here are "STORESCU" and "ANY-SCP". */ + /* structure. The default values to be set here are "FINDSCU" and "ANY-SCP". */ ASC_setAPTitles(params, ourTitle, peerTitle, NULL); /* Set the transport layer type (type of network connection) in the params */ @@ -206,7 +269,6 @@ OFCondition DcmFindSCU::performQuery( /* Set the presentation contexts which will be negotiated */ /* when the network connection will be established */ cond = addPresentationContext(params, abstractSyntax, preferredTransferSyntax); - if (cond.bad()) return cond; /* dump presentation contexts if required */ @@ -218,7 +280,8 @@ OFCondition DcmFindSCU::performQuery( cond = ASC_requestAssociation(net_, params, &assoc); - if (cond.bad()) { + if (cond.bad()) + { if (cond == DUL_ASSOCIATIONREJECTED) { T_ASC_RejectParameters rej; ASC_getRejectParameters(params, &rej); @@ -244,21 +307,50 @@ OFCondition DcmFindSCU::performQuery( /* dump general information concerning the establishment of the network connection if required */ DCMNET_INFO("Association Accepted (Max Send PDV: " << assoc->sendPDVLength << ")"); + /* extract all responses to a single XML file? */ + if (extractResponses == FEM_singleXMLFile) + { + DCMNET_INFO("Writing all response datasets to file: " << outputFilename); + /* create output file */ + outputStream.open(outputFilename.c_str()); + if (outputStream.good()) + { + /* write XML header and top-level element */ + outputStream << "" << OFendl; + outputStream << "" << OFendl; + } else { + /* report details on file i/o error */ + DCMNET_ERROR("Writing file: " << outputFilename << ": " << OFStandard::getLastSystemErrorCode().message()); + } + } + /* do the real work, i.e. for all files which were specified in the command line, send a */ /* C-FIND-RQ to the other DICOM application and receive corresponding response messages. */ cond = EC_Normal; if ((fileNameList == NULL) || fileNameList->empty()) { /* no files provided on command line */ - cond = findSCU(assoc, NULL, repeatCount, abstractSyntax, blockMode, dimse_timeout, extractResponsesToFile, cancelAfterNResponses, overrideKeys, callback, outputDirectory); + cond = findSCU(assoc, NULL, repeatCount, abstractSyntax, blockMode, dimse_timeout, extractResponses, cancelAfterNResponses, overrideKeys, callback, outputDirectory, &outputStream); } else { - OFListIterator(OFString) iter = fileNameList->begin(); - OFListIterator(OFString) enditer = fileNameList->end(); - while ((iter != enditer) && cond.good()) - { - cond = findSCU(assoc, (*iter).c_str(), repeatCount, abstractSyntax, blockMode, dimse_timeout, extractResponsesToFile, cancelAfterNResponses, overrideKeys, callback, outputDirectory); - ++iter; - } + OFListIterator(OFString) iter = fileNameList->begin(); + OFListIterator(OFString) enditer = fileNameList->end(); + while ((iter != enditer) && cond.good()) + { + cond = findSCU(assoc, (*iter).c_str(), repeatCount, abstractSyntax, blockMode, dimse_timeout, extractResponses, cancelAfterNResponses, overrideKeys, callback, outputDirectory, &outputStream); + ++iter; + } + } + + /* close XML file with responses */ + if (extractResponses == FEM_singleXMLFile) + { + if (outputStream.good()) + outputStream << "" << OFendl; + outputStream.close(); } /* tear down association, i.e. terminate network connection to SCP */ @@ -393,7 +485,7 @@ OFCondition DcmFindSCU::addPresentationContext( OFBool DcmFindSCU::writeToFile(const char* ofname, DcmDataset *dataset) { - /* write out as a file format */ + /* write out as a DICOM file format */ DcmFileFormat fileformat(dataset); // copies dataset OFCondition ec = fileformat.error(); @@ -412,6 +504,83 @@ OFBool DcmFindSCU::writeToFile(const char* ofname, DcmDataset *dataset) } +OFBool DcmFindSCU::writeToXMLFile(const char* ofname, DcmDataset *dataset) +{ + if (dataset == NULL) return OFFalse; + + /* write out as an XML file (dataset only) */ + + STD_NAMESPACE ofstream stream(ofname); + if (stream.good()) + { + size_t writeFlags = 0; + + /* try to determine character set of the dataset */ + OFString encString; + OFString csetString; + if (dataset->findAndGetOFStringArray(DCM_SpecificCharacterSet, csetString).good()) + { + if (csetString == "ISO_IR 6") // should never be present in a dataset, but ... + encString = "UTF-8"; + else if (csetString == "ISO_IR 192") + encString = "UTF-8"; + else if (csetString == "ISO_IR 100") + encString = "ISO-8859-1"; + else if (csetString == "ISO_IR 101") + encString = "ISO-8859-2"; + else if (csetString == "ISO_IR 109") + encString = "ISO-8859-3"; + else if (csetString == "ISO_IR 110") + encString = "ISO-8859-4"; + else if (csetString == "ISO_IR 148") + encString = "ISO-8859-9"; + else if (csetString == "ISO_IR 144") + encString = "ISO-8859-5"; + else if (csetString == "ISO_IR 127") + encString = "ISO-8859-6"; + else if (csetString == "ISO_IR 126") + encString = "ISO-8859-7"; + else if (csetString == "ISO_IR 138") + encString = "ISO-8859-8"; + else { + if (!csetString.empty()) + { + if (dataset->containsExtendedCharacters(OFFalse /*checkAllStrings*/)) + { + DCMNET_WARN("SpecificCharacterSet (0008,0005) value '" << csetString + << "' not supported ... quoting non-ASCII characters"); + } else { + DCMNET_WARN("SpecificCharacterSet (0008,0005) value '" << csetString << "' not supported"); + } + } + /* make sure that non-ASCII characters are quoted appropriately */ + writeFlags |= DCMTypes::XF_convertNonASCII; + } + } + /* we expect that the DICOM encoding is correct, so there is no "else" block */ + + /* write XML document header */ + stream << "" << OFendl; + + /* write response dataset to XML file */ + OFCondition ec = dataset->writeXML(stream, writeFlags); + if (ec.bad()) { + DCMNET_ERROR("Writing file: " << ofname << ": " << ec.text()); + return OFFalse; + } + } else { + DCMNET_ERROR("Writing file: " << ofname << ": " << OFStandard::getLastSystemErrorCode().message()); + return OFFalse; + } + + return OFTrue; +} + + OFCondition DcmFindSCU::findSCU( T_ASC_Association * assoc, const char *fname, @@ -419,11 +588,12 @@ OFCondition DcmFindSCU::findSCU( const char *abstractSyntax, T_DIMSE_BlockingMode blockMode, int dimse_timeout, - OFBool extractResponsesToFile, + DcmFindSCUExtractMode extractResponses, int cancelAfterNResponses, OFList *overrideKeys, DcmFindSCUCallback *callback, - const char *outputDirectory) const + const char *outputDirectory, + STD_NAMESPACE ofstream *outputStream) const /* * This function will read all the information from the given file * (this information specifies a search mask), figure out a corresponding @@ -497,10 +667,10 @@ OFCondition DcmFindSCU::findSCU( bzero(OFreinterpret_cast(char*, &req), sizeof(req)); strcpy(req.AffectedSOPClassUID, abstractSyntax); req.DataSetType = DIMSE_DATASET_PRESENT; - req.Priority = DIMSE_PRIORITY_LOW; + req.Priority = DIMSE_PRIORITY_MEDIUM; /* prepare the callback data */ - DcmFindSCUDefaultCallback defaultCallback(extractResponsesToFile, cancelAfterNResponses, outputDirectory); + DcmFindSCUDefaultCallback defaultCallback(extractResponses, cancelAfterNResponses, outputDirectory, outputStream); if (callback == NULL) callback = &defaultCallback; callback->setAssociation(assoc); callback->setPresentationContextID(presId); diff --git a/dcmnet/libsrc/dul.cc b/dcmnet/libsrc/dul.cc index 757b9950..a939d67e 100644 --- a/dcmnet/libsrc/dul.cc +++ b/dcmnet/libsrc/dul.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -131,6 +131,10 @@ typedef void (*mySIG_TYP)(int); #endif END_EXTERN_C +#ifdef DCMTK_HAVE_POLL +#include +#endif + #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmnet/dcompat.h" #include "dcmtk/dcmnet/dicom.h" @@ -145,7 +149,6 @@ END_EXTERN_C #include "dcmtk/dcmnet/dcmtrans.h" #include "dcmtk/dcmnet/dcmlayer.h" #include "dcmtk/ofstd/ofstd.h" -#include "dcmtk/ofstd/ofnetdb.h" OFGlobal dcmDisableGethostbyaddr(OFFalse); OFGlobal dcmConnectionTimeout(-1); @@ -1523,8 +1526,9 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, DUL_ASSOCIATESERVICEPARAMETERS * params, PRIVATE_ASSOCIATIONKEY ** association) { - fd_set - fdset; +#ifndef DCMTK_HAVE_POLL + fd_set fdset; +#endif struct timeval timeout_val; #ifdef HAVE_DECLARATION_SOCKLEN_T socklen_t len; @@ -1535,7 +1539,6 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, #endif int nfound, connected; struct sockaddr from; - OFStandard::OFHostent remote; struct linger sockarg; #ifdef HAVE_FORK @@ -1573,16 +1576,27 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, if (block == DUL_NOBLOCK) { connected = 0; - FD_ZERO(&fdset); +#ifdef DCMTK_HAVE_POLL + struct pollfd pfd[] = + { + { (*network)->networkSpecific.TCP.listenSocket, POLLIN, 0 } + }; +#else + FD_ZERO(&fdset); #ifdef __MINGW32__ // on MinGW, FD_SET expects an unsigned first argument FD_SET((unsigned int)((*network)->networkSpecific.TCP.listenSocket), &fdset); #else FD_SET((*network)->networkSpecific.TCP.listenSocket, &fdset); -#endif +#endif /* __MINGW32__ */ +#endif /* DCMTK_HAVE_POLL */ timeout_val.tv_sec = timeout; timeout_val.tv_usec = 0; + +#ifdef DCMTK_HAVE_POLL + nfound = poll(pfd, 1, timeout_val.tv_sec*1000+(timeout_val.tv_usec/1000)); +#else #ifdef HAVE_INTP_SELECT nfound = select( OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1), @@ -1593,14 +1607,21 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, nfound = select( OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1), &fdset, NULL, NULL, &timeout_val); -#endif +#endif /* HAVE_INTP_SELECT */ +#endif /* DCMTK_HAVE_POLL*/ + if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { DU_logSelectResult(nfound); } if (nfound > 0) { +#ifdef DCMTK_HAVE_POLL + if (pfd[0].revents & POLLIN) + connected++; +#else if (FD_ISSET((*network)->networkSpecific.TCP.listenSocket, &fdset)) connected++; +#endif } if (!connected) return DUL_NOASSOCIATIONREQUEST; } @@ -1608,16 +1629,25 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, { connected = 0; do { +#ifdef DCMTK_HAVE_POLL + struct pollfd pfd[]= + { + { (*network)->networkSpecific.TCP.listenSocket, POLLIN, 0 } + }; +#else FD_ZERO(&fdset); #ifdef __MINGW32__ // on MinGW, FD_SET expects an unsigned first argument FD_SET((unsigned int)((*network)->networkSpecific.TCP.listenSocket), &fdset); #else FD_SET((*network)->networkSpecific.TCP.listenSocket, &fdset); -#endif - +#endif /* __MINGW32__ */ +#endif /* DCMTK_HAVE_POLL */ timeout_val.tv_sec = 5; timeout_val.tv_usec = 0; +#ifdef DCMTK_HAVE_POLL + nfound = poll(pfd, 1, timeout_val.tv_sec*1000+(timeout_val.tv_usec/1000)); +#else #ifdef HAVE_INTP_SELECT nfound = select( OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1), @@ -1628,15 +1658,20 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, nfound = select( OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1), &fdset, NULL, NULL, &timeout_val); -#endif +#endif /* HAVE_INTP_SELECT */ +#endif /* DCMTK_HAVE_POLL */ if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { DU_logSelectResult(nfound); } if (nfound > 0) { - if (FD_ISSET((*network)->networkSpecific.TCP.listenSocket, - &fdset)) +#ifdef DCMTK_HAVE_POLL + if (pfd[0].revents & POLLIN) connected++; +#else + if (FD_ISSET((*network)->networkSpecific.TCP.listenSocket, &fdset)) + connected++; +#endif } } while (!connected); } @@ -1918,28 +1953,28 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, ((int) from.sa_data[5]) & 0xff); if (! dcmDisableGethostbyaddr.get()) - remote = OFStandard::getHostByAddr(&from.sa_data[2], 4, 2); - if (!remote) + client_dns_name = OFStandard::getHostnameByAddress(&from.sa_data[2], sizeof(struct in_addr), AF_INET); + + if (client_dns_name.length() == 0) { // reverse DNS lookup disabled or host not found, use numerical address OFStandard::strlcpy(params->callingPresentationAddress, client_ip_address, sizeof(params->callingPresentationAddress)); OFStandard::strlcpy((*association)->remoteNode, client_ip_address, sizeof((*association)->remoteNode)); + DCMNET_DEBUG("Association Received: " << params->callingPresentationAddress ); } else { - client_dns_name = remote.h_name.c_str(); - - char node[128]; + char node[260]; if ((*network)->options & DUL_FULLDOMAINNAME) - OFStandard::strlcpy(node, remote.h_name.c_str(), sizeof(node)); + OFStandard::strlcpy(node, client_dns_name.c_str(), sizeof(node)); else { - if (sscanf(remote.h_name.c_str(), "%[^.]", node) != 1) + if (sscanf(client_dns_name.c_str(), "%[^.]", node) != 1) node[0] = '\0'; } - OFStandard::strlcpy((*association)->remoteNode, node, sizeof((*association)->remoteNode)); OFStandard::strlcpy(params->callingPresentationAddress, node, sizeof(params->callingPresentationAddress)); + DCMNET_DEBUG("Association Received: " << params->callingPresentationAddress ); } #ifdef WITH_TCPWRAPPER diff --git a/dcmnet/libsrc/dulextra.cc b/dcmnet/libsrc/dulextra.cc index 4976308b..9845f3e4 100644 --- a/dcmnet/libsrc/dulextra.cc +++ b/dcmnet/libsrc/dulextra.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -94,6 +94,9 @@ #ifdef HAVE_SYS_SELECT_H #include #endif +#ifdef DCMTK_HAVE_POLL +#include +#endif #include "dcmtk/dcmnet/dicom.h" #include "dcmtk/dcmnet/lst.h" @@ -132,7 +135,6 @@ DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout) DcmNativeSocketType s; OFBool assocWaiting = OFFalse; struct timeval t; - fd_set fdset; int nfound; if (callerNet == NULL) @@ -142,17 +144,28 @@ DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout) s = net->networkSpecific.TCP.listenSocket; - FD_ZERO(&fdset); - FD_SET(s, &fdset); +#ifndef DCMTK_HAVE_POLL + fd_set fdset; + FD_ZERO(&fdset); + FD_SET(s, &fdset); +#endif t.tv_sec = timeout; t.tv_usec = 0; +#ifdef DCMTK_HAVE_POLL + struct pollfd pfd[] = + { + { s, POLLIN, 0 } + }; + nfound = poll(pfd, 1, t.tv_sec*1000+(t.tv_usec/1000)); +#else #ifdef HAVE_INTP_SELECT nfound = select(OFstatic_cast(int, s + 1), (int *)(&fdset), NULL, NULL, &t); #else // This is safe because on Windows the first select() parameter is ignored anyway nfound = select(OFstatic_cast(int, s + 1), &fdset, NULL, NULL, &t); -#endif +#endif /* HAVE_INTP_SELECT */ +#endif /* DCMTK_HAVE_POLL */ if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { DU_logSelectResult(nfound); @@ -160,10 +173,17 @@ DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout) if (nfound <= 0) assocWaiting = OFFalse; else { +#ifdef DCMTK_HAVE_POLL + if (pfd[0].revents & POLLIN) + assocWaiting = OFTrue; + else /* This one should not really happen */ + assocWaiting = OFFalse; +#else if (FD_ISSET(s, &fdset)) assocWaiting = OFTrue; else /* This one should not really happen */ assocWaiting = OFFalse; +#endif } return assocWaiting; diff --git a/dcmnet/libsrc/dulfsm.cc b/dcmnet/libsrc/dulfsm.cc index 3cb5cf1b..24d84f65 100644 --- a/dcmnet/libsrc/dulfsm.cc +++ b/dcmnet/libsrc/dulfsm.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -102,6 +102,9 @@ BEGIN_EXTERN_C #include /* for TCP_NODELAY */ #endif END_EXTERN_C +#ifdef DCMTK_HAVE_POLL +#include +#endif #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmnet/dicom.h" @@ -117,7 +120,7 @@ END_EXTERN_C #include "dcmtk/dcmnet/dcmtrans.h" #include "dcmtk/dcmnet/dcmlayer.h" #include "dcmtk/dcmnet/diutil.h" -#include "dcmtk/ofstd/ofnetdb.h" +#include "dcmtk/ofstd/ofsockad.h" /* for class OFSockAddr */ /* At least Solaris doesn't define this */ #ifndef INADDR_NONE @@ -2209,8 +2212,7 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, { char node[128]; int port; - struct sockaddr_in server; - OFStandard::OFHostent hp; + OFSockAddr server; #ifdef _WIN32 SOCKET s; #else @@ -2225,45 +2227,47 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, return makeDcmnetCondition(DULC_ILLEGALSERVICEPARAMETER, OF_error, buf); } - s = socket(AF_INET, SOCK_STREAM, 0); -#ifdef _WIN32 - if (s == INVALID_SOCKET) -#else - if (s < 0) -#endif - { - OFString msg = "TCP Initialization Error: "; - msg += OFStandard::getLastNetworkErrorCode().message(); - return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); - } - server.sin_family = AF_INET; - /* * At least officially, gethostbyname will not accept an IP address on many * operating systems (e.g. Windows or FreeBSD), so we need to explicitly * handle the IP address case. */ unsigned long addr = inet_addr(node); - if (addr != INADDR_NONE) { - // it is an IP address - server.sin_addr.s_addr = addr; - } else { - // must be a host name - hp = OFStandard::getHostByName(node); - if (!hp) + if (addr != INADDR_NONE) + { + // it is an IPv4 address + server.setFamily(AF_INET); + struct sockaddr_in *sa = server.getSockaddr_in(); + sa->sin_addr.s_addr = addr; + } + else + { + // must be a host name or an IPv6 address + OFStandard::getAddressByHostname(node, server); + if (server.getFamily() == 0) { char buf2[4095]; // node could be a long string sprintf(buf2, "Attempt to connect to unknown host: %s", node); return makeDcmnetCondition(DULC_UNKNOWNHOST, OF_error, buf2); } - (void) memcpy(&server.sin_addr, hp.h_addr.c_str(), (size_t) hp.h_length); } - - server.sin_port = (unsigned short) htons(port); + server.setPort(OFstatic_cast(unsigned short, htons(port))); // get global connection timeout Sint32 connectTimeout = dcmConnectionTimeout.get(); + s = socket(server.getFamily(), SOCK_STREAM, 0); +#ifdef _WIN32 + if (s == INVALID_SOCKET) +#else + if (s < 0) +#endif + { + OFString msg = "TCP Initialization Error: "; + msg += OFStandard::getLastNetworkErrorCode().message(); + return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); + } + #ifdef HAVE_WINSOCK_H u_long arg = TRUE; #else @@ -2284,7 +2288,7 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, // depending on the socket mode, connect will block or return immediately int rc; do { - rc = connect(s, (struct sockaddr *) & server, sizeof(server)); + rc = connect(s, server.getSockaddr(), server.size()); } while (rc == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); #ifdef HAVE_WINSOCK_H @@ -2293,6 +2297,7 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, if (rc < 0 && errno == EINPROGRESS) #endif { +#ifndef DCMTK_HAVE_POLL // we're in non-blocking mode. Prepare to wait for timeout. fd_set fdSet; FD_ZERO(&fdSet); @@ -2301,15 +2306,24 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, FD_SET((unsigned int) s, &fdSet); #else FD_SET(s, &fdSet); -#endif +#endif /* __MINGW32__ */ +#endif /* DCMTK_HAVE_POLL */ struct timeval timeout; timeout.tv_sec = connectTimeout; timeout.tv_usec = 0; do { +#ifdef DCMTK_HAVE_POLL + struct pollfd pfd[] = + { + { s, POLLIN, 0 } + }; + rc = poll(pfd, 1, timeout.tv_sec*1000+(timeout.tv_usec/1000)); +#else // the typecast is safe because Windows ignores the first select() parameter anyway rc = select(OFstatic_cast(int, s + 1), NULL, &fdSet, NULL, &timeout); +#endif } while (rc == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) diff --git a/dcmnet/libsrc/scp.cc b/dcmnet/libsrc/scp.cc index 10b553e2..4bf9ddcf 100644 --- a/dcmnet/libsrc/scp.cc +++ b/dcmnet/libsrc/scp.cc @@ -71,7 +71,6 @@ OFCondition DcmSCP::setConfig(const DcmSCPConfig& config) OFCondition DcmSCP::listen() { - // make sure not to let dcmdata remove trailing blank padding or perform other // manipulations. We want to see the real data. dcmEnableAutomaticInputDataCorrection.set( OFFalse ); @@ -92,6 +91,12 @@ OFCondition DcmSCP::listen() #endif #endif + // Check whether current association profile is valid + OFString tmp; + OFCondition result = m_cfg->checkAssociationProfile(m_cfg->getActiveAssociationProfile(), tmp); + if (result.bad()) + return result; + // Initialize network, i.e. create an instance of T_ASC_Network*. T_ASC_Network *network = NULL; cond = ASC_initializeNetwork( NET_ACCEPTOR, OFstatic_cast(int, m_cfg->getPort()), m_cfg->getACSETimeout(), &network ); @@ -240,6 +245,9 @@ void DcmSCP::refuseAssociation(const DcmRefuseReasonType reason) case DCMSCP_BAD_APPLICATION_CONTEXT_NAME: DCMNET_INFO("Refusing Association (bad application context)"); break; + case DCMSCP_CALLING_HOST_NOT_ALLOWED: + DCMNET_INFO("Refusing Association (connecting host not allowed)"); + break; case DCMSCP_CALLED_AE_TITLE_NOT_RECOGNIZED: DCMNET_INFO("Refusing Association (called AE title not recognized)"); break; @@ -294,6 +302,7 @@ void DcmSCP::refuseAssociation(const DcmRefuseReasonType reason) case DCMSCP_FORCED: case DCMSCP_NO_IMPLEMENTATION_CLASS_UID: case DCMSCP_NO_PRESENTATION_CONTEXTS: + case DCMSCP_CALLING_HOST_NOT_ALLOWED: case DCMSCP_INTERNAL_ERROR: default: rej.result = ASC_RESULT_REJECTEDPERMANENT; @@ -393,7 +402,15 @@ OFCondition DcmSCP::processAssociationRQ() return EC_Normal; } - // Condition 3: if the calling or called application entity title is not supported + // Condition 3: if the calling host is not supported, we want to refuse + // the association request + if (!checkCallingHostAccepted(m_assoc->params->DULparams.calledPresentationAddress)) + { + refuseAssociation( DCMSCP_CALLING_HOST_NOT_ALLOWED ); + return EC_Normal; + } + + // Condition 4: if the calling or called application entity title is not supported // we want to refuse the association request if (!checkCalledAETitleAccepted(m_assoc->params->DULparams.calledAPTitle)) { @@ -558,7 +575,9 @@ OFCondition DcmSCP::handleIncomingCommand(T_DIMSE_Message *incomingMsg, const DcmPresentationContextInfo &presInfo) { OFCondition cond; - if (incomingMsg->CommandField == DIMSE_C_ECHO_RQ) + // Handle C-ECHO for Verification SOP Class + if ( (incomingMsg->CommandField == DIMSE_C_ECHO_RQ) + && (presInfo.abstractSyntax == UID_VerificationSOPClass) ) { // Process C-ECHO request cond = handleECHORequest(incomingMsg->msg.CEchoRQ, presInfo.presentationContextID); @@ -1632,6 +1651,21 @@ void DcmSCP::setMaxReceivePDULength(const Uint32 maxRecPDU) m_cfg->setMaxReceivePDULength(maxRecPDU); } +// ---------------------------------------------------------------------------- + +OFCondition DcmSCP::setEnableVerification(const OFString &profile) +{ + + OFList xfers; + xfers.push_back(UID_LittleEndianExplicitTransferSyntax); + xfers.push_back(UID_BigEndianExplicitTransferSyntax); + xfers.push_back(UID_LittleEndianImplicitTransferSyntax); + return m_cfg->addPresentationContext(UID_VerificationSOPClass, xfers, ASC_SC_ROLE_DEFAULT, profile); +} + +// ---------------------------------------------------------------------------- + + // ---------------------------------------------------------------------------- OFCondition DcmSCP::addPresentationContext(const OFString &abstractSyntax, diff --git a/dcmnet/libsrc/scpcfg.cc b/dcmnet/libsrc/scpcfg.cc index ba9810e4..61e7f7bd 100644 --- a/dcmnet/libsrc/scpcfg.cc +++ b/dcmnet/libsrc/scpcfg.cc @@ -324,8 +324,34 @@ OFCondition DcmSCPConfig::setAndCheckAssociationProfile(const OFString &profileN if (profileName.empty()) return EC_IllegalParameter; - DCMNET_TRACE("Setting and checking SCP association profile"); + DCMNET_TRACE("Setting and checking SCP association profile " << profileName); OFString mangledName; + OFCondition result = checkAssociationProfile(profileName, mangledName); + if (result.good()) + { + m_assocCfgProfileName = mangledName; + DCMNET_TRACE("Setting SCP association profile to (mangled name) " << mangledName); + } + return result; +} + +// ---------------------------------------------------------------------------- + +OFString DcmSCPConfig::getActiveAssociationProfile() const +{ + return m_assocCfgProfileName; +} + +// ---------------------------------------------------------------------------- + +OFCondition DcmSCPConfig::checkAssociationProfile(const OFString& profileName, + OFString& mangledName) const +{ + if (profileName.empty()) + return EC_IllegalParameter; + + DCMNET_TRACE("Checking SCP association profile " << profileName); + mangledName.clear(); OFCondition result; /* perform name mangling for config file key */ @@ -338,16 +364,15 @@ OFCondition DcmSCPConfig::setAndCheckAssociationProfile(const OFString &profileN /* check profile */ if (result.good() && !m_assocConfig.isKnownProfile(mangledName.c_str())) { - DCMNET_ERROR("No association profile named \"" << profileName << "\" in association configuration"); - result = EC_IllegalParameter; // TODO: need to find better error code + DCMNET_ERROR("No association profile named \"" << profileName << "\" in association configuration, " << + "did you forget to add presentation contexts?"); + result = NET_EC_InvalidSCPAssociationProfile; } if (result.good() && !m_assocConfig.isValidSCPProfile(mangledName.c_str())) { DCMNET_ERROR("The association profile named \"" << profileName << "\" is not a valid SCP association profile"); - result = EC_IllegalParameter; // TODO: need to find better error code + result = NET_EC_InvalidSCPAssociationProfile; } - if (result.good()) - m_assocCfgProfileName = mangledName; return result; } diff --git a/dcmnet/libsrc/scu.cc b/dcmnet/libsrc/scu.cc index 475486f5..626f99e4 100644 --- a/dcmnet/libsrc/scu.cc +++ b/dcmnet/libsrc/scu.cc @@ -732,7 +732,7 @@ OFCondition DcmSCU::sendSTORERequest(const T_ASC_PresentationContextID presID, OFStandard::strlcpy(req->AffectedSOPClassUID, sopClassUID.c_str(), sizeof(req->AffectedSOPClassUID)); OFStandard::strlcpy(req->AffectedSOPInstanceUID, sopInstanceUID.c_str(), sizeof(req->AffectedSOPInstanceUID)); req->DataSetType = DIMSE_DATASET_PRESENT; - req->Priority = DIMSE_PRIORITY_LOW; + req->Priority = DIMSE_PRIORITY_MEDIUM; /* If desired (optional), insert MOVE originator information if this C-STORE was initiated through a C-MOVE request. @@ -883,7 +883,7 @@ OFCondition DcmSCU::sendMOVERequest(const T_ASC_PresentationContextID presID, // Set target for embedded C-Store's OFStandard::strlcpy(req->MoveDestination, moveDestinationAETitle.c_str(), sizeof(req->MoveDestination)); // Set priority (mandatory) - req->Priority = DIMSE_PRIORITY_LOW; + req->Priority = DIMSE_PRIORITY_MEDIUM; /* Determine SOP Class from presentation context */ OFString abstractSyntax, transferSyntax; @@ -1086,7 +1086,7 @@ OFCondition DcmSCU::sendCGETRequest(const T_ASC_PresentationContextID presID, // Announce dataset req->DataSetType = DIMSE_DATASET_PRESENT; // Specify priority - req->Priority = DIMSE_PRIORITY_LOW; + req->Priority = DIMSE_PRIORITY_MEDIUM; // Determine SOP Class from presentation context OFString abstractSyntax, transferSyntax; @@ -1540,7 +1540,7 @@ OFCondition DcmSCU::sendFINDRequest(const T_ASC_PresentationContextID presID, // Announce dataset req->DataSetType = DIMSE_DATASET_PRESENT; // Specify priority - req->Priority = DIMSE_PRIORITY_LOW; + req->Priority = DIMSE_PRIORITY_MEDIUM; // Determine SOP Class from presentation context OFString abstractSyntax, transferSyntax; diff --git a/dcmnet/tests/Makefile.dep b/dcmnet/tests/Makefile.dep index 1c0b6146..6a51df7d 100644 --- a/dcmnet/tests/Makefile.dep +++ b/dcmnet/tests/Makefile.dep @@ -245,13 +245,13 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scu.h tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -290,7 +290,8 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/spi/logfact.h \ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ - ../../oflog/include/dcmtk/oflog/tracelog.h ../include/dcmtk/dcmnet/scp.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/oftimer.h ../include/dcmtk/dcmnet/scp.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ diff --git a/dcmnet/tests/tests.cc b/dcmnet/tests/tests.cc index 322a91d1..a20e2f07 100644 --- a/dcmnet/tests/tests.cc +++ b/dcmnet/tests/tests.cc @@ -27,6 +27,9 @@ OFTEST_REGISTER(dcmnet_dimseDump_nullByte); #ifdef WITH_THREADS OFTEST_REGISTER(dcmnet_scp_pool); +OFTEST_REGISTER(dcmnet_scp_builtin_verification_support); +OFTEST_REGISTER(dcmnet_scp_fail_on_invalid_association_configuration); +OFTEST_REGISTER(dcmnet_scp_fail_on_disallowed_host); OFTEST_REGISTER(dcmnet_scp_stop_after_current_association); OFTEST_REGISTER(dcmnet_scp_stop_after_timeout); OFTEST_REGISTER(dcmnet_scp_no_stop_wo_request_noblock); diff --git a/dcmnet/tests/tscuscp.cc b/dcmnet/tests/tscuscp.cc index e6cd4b12..6b8cf3be 100644 --- a/dcmnet/tests/tscuscp.cc +++ b/dcmnet/tests/tscuscp.cc @@ -14,7 +14,7 @@ * * Author: Michael Onken * - * Purpose: Test DcmSPC and DcmSCU classes (only certain aspects so far) + * Purpose: Test DcmSCP and DcmSCU classes (only certain aspects so far) * */ @@ -23,12 +23,37 @@ #ifdef WITH_THREADS +#define INCLUDE_CMATH +#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/oftest.h" +#include "dcmtk/ofstd/oftimer.h" #include "dcmtk/dcmnet/scp.h" #include "dcmtk/dcmnet/scu.h" + + static OFLogger t_scuscp_logger= OFLog::getLogger("dcmtk.test.tscuscp"); +/** Method that ensures that the current thread is actually sleeping for the + * defined number of seconds (at least). + * The problem with the regular sleep() function called from OFStandard::sleep + * is that it might be interrupted by signals or a network timeout (depending + * on the operating system). This methods re-executes OFStandard'S sleep method + * until the desired number of seconds have elapsed. + * @param sleep The number of seconds to sleep (at least) + */ +static void force_sleep(Uint32 sleep) +{ + OFTimer timer; + double elapsed = timer.getDiff(); + while (elapsed < (double)sleep) + { + // Use ceiling since otherwise we could wait too short + OFStandard::sleep(OFstatic_cast(unsigned int, ceil(sleep-elapsed))); + elapsed = timer.getDiff(); + } +} + /** SCP derived from DcmSCP in order to test two types of virtual methods: *
    @@ -36,7 +61,7 @@ static OFLogger t_scuscp_logger= OFLog::getLogger("dcmtk.test.tscuscp"); * only the notifiers notifyConnectionTimeout() as and notifyAssociationTermination * are tested *
  • Setters: Functions returning a value in order to enforce - * a specific DcmSCP behaviour. So far, only stopAfterCurrentAssociation() and + * a specific DcmSCP behavior. So far, only stopAfterCurrentAssociation() and * stopAfterConnectionTimeout() are tested. *
* Additionally the SCP derives from OFThread in order to construct the @@ -45,218 +70,359 @@ static OFLogger t_scuscp_logger= OFLog::getLogger("dcmtk.test.tscuscp"); struct TestSCP: DcmSCP, OFThread { - /** Constructor - */ - TestSCP() : - DcmSCP(), - m_listen_result(EC_NotYetImplemented), // value indicating "not set" - m_set_stop_after_assoc(OFFalse), - m_set_stop_after_timeout(OFFalse), - m_stop_after_assoc_result(OFFalse), - m_stop_after_timeout_result(OFFalse), - m_notify_connection_timeout_result(OFFalse), - m_notify_assoc_termination_result(OFFalse) - { - } - - /** Clear settings - */ - void clear() - { - m_listen_result = EC_NotYetImplemented; - m_set_stop_after_assoc = OFFalse; - m_set_stop_after_timeout = OFFalse; - m_stop_after_assoc_result = OFFalse; - m_stop_after_timeout_result = OFFalse; - m_notify_connection_timeout_result = OFFalse; - m_notify_assoc_termination_result = OFFalse; - - } - - /** Overwrite method from DcmSCP in order to test feature to stop after current - * association. - * @return Returns value of m_set_stop_after_assoc - */ - virtual OFBool stopAfterCurrentAssociation() - { - if (m_set_stop_after_assoc) + /** Constructor + */ + TestSCP() : + DcmSCP(), + m_listen_result(EC_NotYetImplemented), // value indicating "not set" + m_set_stop_after_assoc(OFFalse), + m_set_stop_after_timeout(OFFalse), + m_set_reject_calling_host(OFFalse), + m_stop_after_assoc_result(OFFalse), + m_stop_after_timeout_result(OFFalse), + m_notify_connection_timeout_result(OFFalse), + m_notify_assoc_termination_result(OFFalse) + { + } + + /** Clear settings + */ + void clear() + { + m_listen_result = EC_NotYetImplemented; + m_set_stop_after_assoc = OFFalse; + m_set_stop_after_timeout = OFFalse; + m_set_reject_calling_host = OFFalse; + m_stop_after_assoc_result = OFFalse; + m_stop_after_timeout_result = OFFalse; + m_notify_connection_timeout_result = OFFalse; + m_notify_assoc_termination_result = OFFalse; + } + + /** Overwrite method from DcmSCP in order to test feature to stop after current + * association. + * @return Returns value of m_set_stop_after_assoc + */ + virtual OFBool stopAfterCurrentAssociation() + { + if (m_set_stop_after_assoc) + { + m_stop_after_assoc_result = OFTrue; + } + else + { + m_stop_after_assoc_result = OFFalse; + } + return m_set_stop_after_assoc; + } + + /** Overwrite method from DcmSCP in order to test feature to stop after + * the SCP's connection timeout occurred in non-blocking mode. + * @return Returns value of m_set_stop_after_timeout + */ + virtual OFBool stopAfterConnectionTimeout() { - m_stop_after_assoc_result = OFTrue; + if (m_set_stop_after_timeout) + { + m_stop_after_timeout_result = OFTrue; + } + else + { + m_stop_after_timeout_result = OFFalse; + } + return m_stop_after_timeout_result; } - return m_set_stop_after_assoc; - } - - /** Overwrite method from DcmSCP in order to test feature to stop after - * the SCP's connection timeout occurred in non-blocking mode. - * @return Returns value of m_set_stop_after_timeout - */ - virtual OFBool stopAfterConnectionTimeout() - { - if (m_set_stop_after_timeout) + + /** Overwrite method from DcmSCP in order to test feature that SCP reports + * connection timeout in non-blocking mode. + */ + virtual void notifyConnectionTimeout() { - m_stop_after_timeout_result = OFTrue; + m_notify_connection_timeout_result = OFTrue; + } + + /** Overwrite method from DcmSCP in order to test feature that SCP reports + * the termination of an association. + */ + virtual void notifyAssociationTermination() + { + m_notify_assoc_termination_result = OFTrue; + } + + /** Overwrite method from DcmSCP in order to test feature that SCP rejects + * a forbidden host. + * @param hostOrIP The host name or IP address to be checked + */ + virtual OFBool checkCallingHostAccepted(const OFString& hostOrIP) + { + // In order to test this feature, we do not need to perform actual checking + (void)hostOrIP; + if (m_set_reject_calling_host) + { + m_calling_host_accepted = OFFalse; + return OFFalse; + } + else + { + m_calling_host_accepted = OFTrue; + return OFTrue; + } + } + + /// The result returned my SCP's listen() method + OFCondition m_listen_result; + /// If set, the SCP should stop after the currently running association + OFBool m_set_stop_after_assoc; + /// If set, the SCP should stop after TCP timeout occurred in non-blocking mode + OFBool m_set_stop_after_timeout; + /// If set, the SCP should not allow the calling host (whatever it is) + OFBool m_set_reject_calling_host; + /// Indicator whether related virtual function was called and returned accordingly + OFBool m_stop_after_assoc_result; + /// Indicator whether related virtual function was called and returned accordingly + OFBool m_stop_after_timeout_result; + /// Indicator whether the calling host was accepted + OFBool m_calling_host_accepted; + /// Indicator whether related virtual notifier function was called + OFBool m_notify_connection_timeout_result; + /// Indicator whether related virtual notifier function was called + OFBool m_notify_assoc_termination_result; + + /** Method called by OFThread to start SCP operation. Starts listen() loop of DcmSCP. + */ + virtual void run() + { + m_listen_result = listen(); } - return m_set_stop_after_timeout; - } - - /** Overwrite method from DcmSCP in order to test feature that SCP reports - * connection timeout in non-blocking mode. - */ - virtual void notifyConnectionTimeout() - { - m_notify_connection_timeout_result = OFTrue; - } - - /** Overwrite method from DcmSCP in order to test feature that SCP reports - * the termination of an association. - */ - virtual void notifyAssociationTermination() - { - m_notify_assoc_termination_result = OFTrue; - } - - /// The result returned my SCP's listen() method - OFCondition m_listen_result; - /// If set, the SCP should stop after the currently running association - OFBool m_set_stop_after_assoc; - /// If set, the SCP should stop after TCP timeout occurred in non-blocking mode - OFBool m_set_stop_after_timeout; - /// Indicator whether related virtual function was called and returned accordingly - OFBool m_stop_after_assoc_result; - /// Indicator whether related virtual function was called and returned accordingly - OFBool m_stop_after_timeout_result; - /// Indicator whether related virtual notifier function was called - OFBool m_notify_connection_timeout_result; - /// Indicator whether related virtual notifier function was called - OFBool m_notify_assoc_termination_result; - - /** Method called by OFThread to start SCP operation. Starts listen() loop of DcmSCP. - */ - virtual void run() - { - m_listen_result = listen(); - } }; -/** Configure Verification SOP class on server - * @param cfg The SCP configuration to modify +// -------------- End of class TestSCP ------------------------- + + +/** Manually configure Verification SOP class on server + * @param cfg The SCP configuration to modify */ void configure_scp_for_echo(DcmSCPConfig& cfg, T_ASC_SC_ROLE roleOfRequestor = ASC_SC_ROLE_DEFAULT) { - cfg.setPort(11112); - OFList xfers; - xfers.push_back(UID_LittleEndianImplicitTransferSyntax); - OFCHECK(cfg.addPresentationContext(UID_VerificationSOPClass, xfers, roleOfRequestor).good()); + cfg.setPort(11112); + OFList xfers; + xfers.push_back(UID_LittleEndianImplicitTransferSyntax); + OFCHECK(cfg.addPresentationContext(UID_VerificationSOPClass, xfers, roleOfRequestor).good()); } /** Send ECHO to SCP - * @param called_ae_title The Called AE Title to be used - * @param do_release If OFTrue, SCU should release the association (otherwise - * we expect the SCP to do that. - * @param secs_after_echo Seconds to wait after sending echo + * @param called_ae_title The Called AE Title to be used + * @param do_release If OFTrue, SCU should release the association (otherwise + * we expect the SCP to do that) + * @param secs_after_echo Seconds to wait after sending echo */ void scu_sends_echo( const OFString& called_ae_title, + const OFBool expect_assoc_reject = OFFalse, const OFBool do_release = OFTrue, const int secs_after_echo = 0) { - // make sure server is up - OFStandard::sleep(2); - DcmSCU scu; - scu.setAETitle("TEST_SCU"); - scu.setPeerAETitle(called_ae_title); - scu.setPeerHostName("localhost"); - scu.setPeerPort(11112); - OFList xfers; - xfers.push_back(UID_LittleEndianImplicitTransferSyntax); - OFCondition result = scu.addPresentationContext(UID_VerificationSOPClass, xfers); - OFCHECK(result.good()); - result = scu.initNetwork(); - OFCHECK(result.good()); - result = scu.negotiateAssociation(); - OFCHECK(result.good()); - result = scu.sendECHORequest(1); - OFCHECK(result.good()); - OFStandard::sleep(secs_after_echo); - if (do_release) - { - result = scu.releaseAssociation(); + // make sure server is up + force_sleep(2); + DcmSCU scu; + scu.setAETitle("TEST_SCU"); + scu.setPeerAETitle(called_ae_title); + scu.setPeerHostName("localhost"); + scu.setPeerPort(11112); + OFList xfers; + xfers.push_back(UID_LittleEndianImplicitTransferSyntax); + OFCondition result = scu.addPresentationContext(UID_VerificationSOPClass, xfers); OFCHECK(result.good()); - } - - return; + result = scu.initNetwork(); + OFCHECK(result.good()); + result = scu.negotiateAssociation(); + if (!expect_assoc_reject) + { + OFCHECK(result.good()); + result = scu.sendECHORequest(1); + OFCHECK(result.good()); + force_sleep(secs_after_echo); + if (do_release) + { + result = scu.releaseAssociation(); + OFCHECK(result.good()); + } + } + else + { + OFCHECK(result == DUL_ASSOCIATIONREJECTED); + } + return; } -// Test case that checks whether server returns after association if enabled +// Test case that checks whether server returns if it is configured to stop +// after current association OFTEST_FLAGS(dcmnet_scp_stop_after_current_association, EF_Slow) { + // Configure SCP for Verification and start it. First we check that the + // server does *not* return after association without configuring it + // accordingly TestSCP scp; DcmSCPConfig& config = scp.getConfig(); configure_scp_for_echo(config); - config.setAETitle("STOP_AFTER_ASSOC"); config.setConnectionBlockingMode(DUL_BLOCK); scp.start(); + // Send ECHO, and wait to be sure SCP has time to exit scu_sends_echo("STOP_AFTER_ASSOC"); - OFStandard::sleep(1); // make sure server would have time to return + // Make sure server would have time to return + force_sleep(2); // Check whether all test variables have the correct values OFCHECK(scp.m_listen_result == EC_NotYetImplemented); // still listening OFCHECK(scp.m_stop_after_assoc_result == OFFalse); OFCHECK(scp.m_stop_after_timeout_result == OFFalse); OFCHECK(scp.m_notify_connection_timeout_result == OFFalse); - OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // scu released association + OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // SCU released association // Tell SCP to stop after association and run SCU again scp.clear(); scp.m_set_stop_after_assoc = OFTrue; scu_sends_echo("STOP_AFTER_ASSOC"); - OFStandard::sleep(1); + force_sleep(2); // Check whether all test variables have the correct values OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation); OFCHECK(scp.m_stop_after_timeout_result == OFFalse); OFCHECK(scp.m_notify_connection_timeout_result == OFFalse); - OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // scu released association + OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // SCU released association scp.join(); - OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation); } -OFTEST_FLAGS(dcmnet_scp_stop_after_timeout, EF_Slow) +// Test case that checks whether server returns with the correct error code if +// configured with an invalid configuration (here: no presentation contexts) +OFTEST_FLAGS(dcmnet_scp_fail_on_invalid_association_configuration, EF_Slow) { + // Configure SCP but do not add any presentation contexts TestSCP scp; DcmSCPConfig& config = scp.getConfig(); - configure_scp_for_echo(config); - - config.setAETitle("STOP_AFTER_TMOUT"); + config.setPort(11112);; + config.setAETitle("TEST_INVALID_CFG"); config.setConnectionBlockingMode(DUL_NOBLOCK); + // Ensure that if the server starts listen loop (it should not), the + // related thread returns anyway. config.setConnectionTimeout(3); scp.m_set_stop_after_timeout = OFTrue; + // Start server and check that it returns with the expected return value. + // In this case we did not configure any presentation contexts, so we + // expect the related error code. + scp.start(); + scp.join(); + OFCHECK(scp.m_listen_result == NET_EC_InvalidSCPAssociationProfile); + OFCHECK(scp.m_stop_after_assoc_result == OFFalse); + OFCHECK(scp.m_stop_after_timeout_result == OFFalse); + OFCHECK(scp.m_notify_connection_timeout_result == OFFalse); + OFCHECK(scp.m_notify_assoc_termination_result == OFFalse); +} + + +// Test case that checks whether server checks for allowed/disallowed host +// names, i.e. it refuses the association in case the connecting host +// is not accepted by the related virtual method. +OFTEST_FLAGS(dcmnet_scp_fail_on_disallowed_host, EF_Slow) +{ + // Configure SCP for Verification + TestSCP scp; + DcmSCPConfig& config = scp.getConfig(); + configure_scp_for_echo(config); + config.setAETitle("REJECT_HOST"); + config.setConnectionBlockingMode(DUL_BLOCK); + // Make sure SCP always returns + scp.m_set_stop_after_assoc = OFTrue; + // Tell SCP to reject calling host + scp.m_set_reject_calling_host = OFTrue; scp.start(); - scu_sends_echo("STOP_AFTER_TMOUT"); - OFStandard::sleep(5); // make sure server has enough time to run into timeout + scu_sends_echo("REJECT_HOST", OFTrue /* expect that association is being refused */); + force_sleep(2); // make sure server would have time to return // Check whether all test variables have the correct values - OFCHECK(scp.m_stop_after_assoc_result == OFFalse); - OFCHECK(scp.m_stop_after_timeout_result == OFTrue); // virtual "decision" method actually called - OFCHECK(scp.m_notify_connection_timeout_result == OFTrue); // virtual notifier method actually called - OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // scu released association + OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation); + OFCHECK(scp.m_stop_after_timeout_result == OFFalse); + OFCHECK(scp.m_notify_connection_timeout_result == OFFalse); + OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); + // Check whether the calling host has been the reason for + // refusing the association + OFCHECK(scp.m_calling_host_accepted == OFFalse); + scp.join(); +} + + +// Test case that checks the SCP's builtin Verification support +// works and serves C-ECHO +OFTEST_FLAGS(dcmnet_scp_builtin_verification_support, EF_Slow) +{ + // Configure SCP and enable built-in Verification SOP Class Handler + TestSCP scp; + scp.setEnableVerification(); + scp.getConfig().setPort(11112); + DcmSCPConfig& config = scp.getConfig(); + config.setAETitle("TEST_BUILTIN_VER"); + config.setConnectionBlockingMode(DUL_BLOCK); + // Make sure server stops after the SCU connection + scp.m_set_stop_after_assoc = OFTrue; + scp.start(); + + // Send echo and receive response + scu_sends_echo("TEST_BUILTIN_VER"); + // make sure server would have time to return + force_sleep(1); + + // Check whether all test variables have the correct values + OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation); + OFCHECK(scp.m_stop_after_timeout_result == OFFalse); + OFCHECK(scp.m_notify_connection_timeout_result == OFFalse); + OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // SCU released association scp.join(); +} + +// Check whether SCP stops after provided timeout +OFTEST_FLAGS(dcmnet_scp_stop_after_timeout, EF_Slow) +{ + // Configure SCP with Verification, and make sure it returns after + // a timeout occurs, i.e. no connection is received. For testing, a connection + // is performed, i.e. timeout occurs after that connection. + TestSCP scp; + DcmSCPConfig& config = scp.getConfig(); + configure_scp_for_echo(config); + config.setAETitle("STOP_ON_TIMEOUT"); + config.setConnectionBlockingMode(DUL_NOBLOCK); + config.setConnectionTimeout(5); + scp.m_set_stop_after_timeout = OFTrue; + scp.start(); + force_sleep(1); + scu_sends_echo("STOP_ON_TIMEOUT"); + // Wait for server to return after connection has been served and timeout + // has been reached + scp.join(); + + // Check whether all test variables have the correct values + OFCHECK(scp.m_stop_after_assoc_result == OFFalse); + OFCHECK(scp.m_stop_after_timeout_result == OFTrue); // timeout has been checked + OFCHECK(scp.m_notify_connection_timeout_result == OFTrue); // timeout notifier method has been called + OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // association ended OFCHECK(scp.m_listen_result == NET_EC_StopAfterConnectionTimeout); // SCP returns, using specific return code } -// Check whether SCP does not stop without request in blocking mode +// Check whether SCP continues after timeout elapsed if timeout handler does +// not tell SCP to stop OFTEST_FLAGS(dcmnet_scp_no_stop_wo_request_noblock, EF_Slow) { + // Configure SCP for Verification, set timeout but do not tell + // SCP to stop after timeout occurs, and start SCP TestSCP scp; DcmSCPConfig& config = scp.getConfig(); configure_scp_for_echo(config); @@ -267,50 +433,48 @@ OFTEST_FLAGS(dcmnet_scp_no_stop_wo_request_noblock, EF_Slow) scp.m_set_stop_after_timeout = OFFalse; scp.start(); - scu_sends_echo("NO_STOP_NOBLOCK"); - OFStandard::sleep(3); // should enough for the SCP to run into a timeout (1 sec) - - // Check whether all test variables have the correct values - OFCHECK(scp.m_listen_result == EC_NotYetImplemented); // still listening + // Check whether all test variables have the correct values, especially that + // timeout occurred but did not lead to a stop + force_sleep(5); + OFCHECK(scp.m_listen_result == EC_NotYetImplemented); // still listening OFCHECK(scp.m_stop_after_assoc_result == OFFalse); OFCHECK(scp.m_stop_after_timeout_result == OFFalse); - OFCHECK(scp.m_notify_connection_timeout_result == OFTrue); // Timeout occurred, but we do not stop - OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // SCU released association + OFCHECK(scp.m_notify_connection_timeout_result == OFTrue); // Timeout occurred, but we did not stop + OFCHECK(scp.m_notify_assoc_termination_result == OFFalse); // SCU released association // Stop (already tested in former test cases) scp.m_set_stop_after_timeout = OFTrue; scp.join(); + } // Check whether SCP does not stop without request in blocking mode OFTEST_FLAGS(dcmnet_scp_no_stop_wo_request_block, EF_Slow) { + // Configure SCP for Verification and to do not ask to exit for any reason TestSCP scp; DcmSCPConfig& config = scp.getConfig(); configure_scp_for_echo(config); - - config.setAETitle("NO_STOP_BLOCK"); config.setConnectionBlockingMode(DUL_BLOCK); scp.start(); - scu_sends_echo("NO_STOP_BLOCK"); - OFStandard::sleep(3); // should enough for the SCP to run into a timeout (1 sec) + + // Give some time to SCP so it could return + force_sleep(3); // Check whether all test variables have the correct values - // SCP did not return yet (check whether it is still connected, - // since no test for m_listen_result possible) + // SCP did not return yet (check whether it is still connected) OFCHECK(scp.m_listen_result == EC_NotYetImplemented); // still listening OFCHECK(scp.m_stop_after_assoc_result == OFFalse); OFCHECK(scp.m_stop_after_timeout_result == OFFalse); OFCHECK(scp.m_notify_connection_timeout_result == OFFalse); OFCHECK(scp.m_notify_assoc_termination_result == OFTrue); // SCU released association - // Stop (already tested in former test cases), therefore, send another echo + // Stop (already tested in former test cases), therefore, send another ECHO scp.m_set_stop_after_assoc = OFTrue; scu_sends_echo("NO_STOP_BLOCK"); - scp.join(); } @@ -319,23 +483,21 @@ OFTEST_FLAGS(dcmnet_scp_no_stop_wo_request_block, EF_Slow) // association at all OFTEST_FLAGS(dcmnet_scp_no_term_notify_without_association, EF_Slow) { + // Configure SCP for Verification and tell it stop after 3 seconds. TestSCP scp; DcmSCPConfig& config = scp.getConfig(); configure_scp_for_echo(config); - config.setAETitle("NO_TERM_WO_ASSOC"); config.setConnectionBlockingMode(DUL_NOBLOCK); - config.setConnectionTimeout(1); + config.setConnectionTimeout(3); scp.m_set_stop_after_timeout = OFTrue; scp.start(); - OFStandard::sleep(3); // make sure server runs into timeout + scp.join(); // Check whether all test variables have the correct values. OFCHECK(scp.m_stop_after_assoc_result == OFFalse); - OFCHECK(scp.m_stop_after_timeout_result == OFFalse); - OFCHECK(scp.m_notify_connection_timeout_result == OFFalse); + OFCHECK(scp.m_stop_after_timeout_result == OFTrue); + OFCHECK(scp.m_notify_connection_timeout_result == OFTrue); OFCHECK(scp.m_notify_assoc_termination_result == OFFalse); // no notification - - scp.join(); OFCHECK(scp.m_listen_result == NET_EC_StopAfterConnectionTimeout); // SCP ran into timeout } @@ -359,24 +521,27 @@ void test_role_selection(const T_ASC_SC_ROLE r_req, static OFVector roles; if (roles.empty()) { - roles.push_back(ASC_SC_ROLE_DEFAULT); - roles.push_back(ASC_SC_ROLE_NONE); - roles.push_back(ASC_SC_ROLE_SCP); - roles.push_back(ASC_SC_ROLE_SCU); - roles.push_back(ASC_SC_ROLE_SCUSCP); + roles.push_back(ASC_SC_ROLE_DEFAULT); + roles.push_back(ASC_SC_ROLE_NONE); + roles.push_back(ASC_SC_ROLE_SCP); + roles.push_back(ASC_SC_ROLE_SCU); + roles.push_back(ASC_SC_ROLE_SCUSCP); } + // Configure SCP for Verification with the desired role, and start it TestSCP scp; DcmSCPConfig& config = scp.getConfig(); configure_scp_for_echo(config, r_acc); - config.setAETitle("ACCEPTOR"); config.setConnectionBlockingMode(DUL_NOBLOCK); - config.setConnectionTimeout(3); + config.setConnectionTimeout(4); config.setAlwaysAcceptDefaultRole(acceptDefaultInsteadOfSCP); - scp.start(); - OFStandard::sleep(1); + + // Ensure server is up and listening + force_sleep(1); + + // Configure SCP and run it against SCP with the desired role DcmSCU scu; scu.setPeerAETitle("ACCEPTOR"); scu.setAETitle("REQUESTOR"); @@ -387,10 +552,10 @@ void test_role_selection(const T_ASC_SC_ROLE r_req, OFCHECK(scu.addPresentationContext(UID_VerificationSOPClass, ts, r_req).good()); OFCHECK(scu.initNetwork().good()); if (!expect_assoc_reject) - OFCHECK(scu.negotiateAssociation().good()); + OFCHECK(scu.negotiateAssociation().good()); else { - OFCHECK(scu.negotiateAssociation() == DUL_ASSOCIATIONREJECTED); + OFCHECK(scu.negotiateAssociation() == DUL_ASSOCIATIONREJECTED); } // Loop over roles and check for each role whether has been negotiated or not. // Only a single role (the expected_result) should be successfully negotiated. @@ -398,40 +563,40 @@ void test_role_selection(const T_ASC_SC_ROLE r_req, OFCondition result; while (it != roles.end()) { - T_ASC_PresentationContextID id = scu.findPresentationContextID(UID_VerificationSOPClass, UID_LittleEndianImplicitTransferSyntax, (*it)); - if ( ((*it) == expected_result) && !expect_assoc_reject) - { - if (id == 0) - { - OFCHECK_FAIL("Error while testing requestor role " << ASC_role2String(r_req) - << " versus acceptor role " << ASC_role2String(r_acc) - << ", expected result: " << ASC_role2String(expected_result) << ", but did not find related presentation context with that role"); - } - } - else - { - if (id != 0) + T_ASC_PresentationContextID id = scu.findPresentationContextID(UID_VerificationSOPClass, UID_LittleEndianImplicitTransferSyntax, (*it)); + if ( ((*it) == expected_result) && !expect_assoc_reject) + { + if (id == 0) + { + OFCHECK_FAIL("Error while testing requestor role " << ASC_role2String(r_req) + << " versus acceptor role " << ASC_role2String(r_acc) + << ", expected result: " << ASC_role2String(expected_result) << ", but did not find related presentation context with that role"); + } + } + else { - OFCHECK_FAIL("Error while testing requestor role " << ASC_role2String(r_req) - << " versus acceptor role " << ASC_role2String(r_acc) - << ", expected result: " << ASC_role2String(expected_result) << ", but found unexpected presentation context for role " << ASC_role2String(*it)); + if (id != 0) + { + OFCHECK_FAIL("Error while testing requestor role " << ASC_role2String(r_req) + << " versus acceptor role " << ASC_role2String(r_acc) + << ", expected result: " << ASC_role2String(expected_result) << ", but found unexpected presentation context for role " << ASC_role2String(*it)); + } } - } - it++; + it++; } scp.m_set_stop_after_assoc = OFTrue; scp.m_set_stop_after_timeout = OFTrue; // also handles the association rejection case // Only release association if we're connected (could happen we're not in case // of test failures of if expect_assoc_reject is true) if (scu.isConnected()) - OFCHECK(scu.releaseAssociation().good()); + OFCHECK(scu.releaseAssociation().good()); scp.join(); } // Test case that checks whether server returns after association if enabled OFTEST_FLAGS(dcmnet_scp_role_selection, EF_Slow) { - // The ollowing role selection behaviour should be implemented and + // The following role selection behavior should be implemented and // is exercised in this test (copied from dul.h): // * +--------------------+------------------+---------+ // * | Requestor Proposal | Acceptor Setting | Result | diff --git a/dcmpmap/include/CMakeLists.txt b/dcmpmap/include/CMakeLists.txt index c9d071bb..569f4489 100644 --- a/dcmpmap/include/CMakeLists.txt +++ b/dcmpmap/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmpmap DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE) +INSTALL(DIRECTORY dcmtk/dcmpmap DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE) diff --git a/dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapbase.h b/dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapbase.h index 923d2d8d..6200c6a4 100644 --- a/dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapbase.h +++ b/dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapbase.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, Open Connections GmbH + * Copyright (C) 2016-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -28,7 +28,7 @@ #include "dcmtk/dcmfg/fgfracon.h" #include "dcmtk/dcmfg/fgframeanatomy.h" #include "dcmtk/dcmfg/fgframevoilut.h" -#include "dcmtk/dcmfg/fgidentpixeltransform.h" +#include "dcmtk/dcmfg/fgpixeltransform.h" #include "dcmtk/dcmfg/fgparametricmapframetype.h" #include "dcmtk/dcmfg/fgpixmsr.h" #include "dcmtk/dcmfg/fgplanor.h" diff --git a/dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapiod.h b/dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapiod.h index e7741571..4c49d929 100644 --- a/dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapiod.h +++ b/dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapiod.h @@ -100,7 +100,7 @@ public: * A list of Defined Terms can be found in the standard. Very often * "MR" is the right choice. Only if a mix of different modalities has been * use for creation "OT" should be used. - * @param seriesNumber A number identifying this series. If importPatientStudyFor() + * @param seriesNumber A number identifying this series. If importHierarchy() * is called later in order to put this Parametric Map into an existing Series, * the Series Number will be taken over from the existing series instead. * @param instanceNumber A number identifying this image @@ -272,7 +272,7 @@ private: * A list of Defined Terms can be found in the standard. Very often * "MR" is the right choice. Only if a mix of different modalities has been * use for creation "OT" should be used. - * @param seriesNumber A number identifying this series. If importPatientStudyFor() + * @param seriesNumber A number identifying this series. If importHierarchy() * is called later in order to put this Parametric Map into an existing Series, * the Series Number will be taken over from the existing series instead. * @param instanceNumber A number identifying this image diff --git a/dcmpmap/libsrc/Makefile.dep b/dcmpmap/libsrc/Makefile.dep index 4382d963..0cc1ae71 100644 --- a/dcmpmap/libsrc/Makefile.dep +++ b/dcmpmap/libsrc/Makefile.dep @@ -335,7 +335,7 @@ dpmparametricmapbase.o: dpmparametricmapbase.cc \ ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \ ../../dcmfg/include/dcmtk/dcmfg/fgframeanatomy.h \ ../../dcmfg/include/dcmtk/dcmfg/fgframevoilut.h \ - ../../dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgpixeltransform.h \ ../../dcmfg/include/dcmtk/dcmfg/fgparametricmapframetype.h \ ../../dcmfg/include/dcmtk/dcmfg/fgpixmsr.h \ ../../dcmfg/include/dcmtk/dcmfg/fgplanor.h \ @@ -507,7 +507,7 @@ dpmparametricmapiod.o: dpmparametricmapiod.cc \ ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \ ../../dcmfg/include/dcmtk/dcmfg/fgframeanatomy.h \ ../../dcmfg/include/dcmtk/dcmfg/fgframevoilut.h \ - ../../dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgpixeltransform.h \ ../../dcmfg/include/dcmtk/dcmfg/fgparametricmapframetype.h \ ../../dcmfg/include/dcmtk/dcmfg/fgpixmsr.h \ ../../dcmfg/include/dcmtk/dcmfg/fgplanor.h \ diff --git a/dcmpmap/libsrc/Makefile.in b/dcmpmap/libsrc/Makefile.in index 5f72f742..4d253f38 100644 --- a/dcmpmap/libsrc/Makefile.in +++ b/dcmpmap/libsrc/Makefile.in @@ -24,7 +24,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include \ LOCALDEFS = -objs = dpmtypes.o dpmtypes.o dpmmodparametricmapseries.o dpmmodparametricmapimage.o dpmparametricmapbase.o dpmparametricmapiod.o +objs = dpmtypes.o dpmmodparametricmapseries.o dpmmodparametricmapimage.o dpmparametricmapbase.o dpmparametricmapiod.o library = libdcmpmap.$(LIBEXT) diff --git a/dcmpstat/data/CMakeLists.txt b/dcmpstat/data/CMakeLists.txt index ea0e4aaa..216158d6 100644 --- a/dcmpstat/data/CMakeLists.txt +++ b/dcmpstat/data/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES philips.lut DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data) +INSTALL(FILES philips.lut DESTINATION "${CMAKE_INSTALL_DATADIR}/dcmtk" COMPONENT data) diff --git a/dcmpstat/etc/CMakeLists.txt b/dcmpstat/etc/CMakeLists.txt index abbf5c16..d48c6480 100644 --- a/dcmpstat/etc/CMakeLists.txt +++ b/dcmpstat/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES dcmpstat.cfg printers.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc) +INSTALL(FILES dcmpstat.cfg printers.cfg DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/dcmtk" COMPONENT etc) diff --git a/dcmpstat/include/CMakeLists.txt b/dcmpstat/include/CMakeLists.txt index 86d4b433..ee3b58ca 100644 --- a/dcmpstat/include/CMakeLists.txt +++ b/dcmpstat/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmpstat DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmpstat DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmpstat/libsrc/Makefile.dep b/dcmpstat/libsrc/Makefile.dep index 4936ec5b..7ef955ea 100644 --- a/dcmpstat/libsrc/Makefile.dep +++ b/dcmpstat/libsrc/Makefile.dep @@ -319,6 +319,8 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmsr/include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../../dcmsr/include/dcmtk/dcmsr/dsrdncsr.h \ + ../../dcmsr/include/dcmtk/dcmsr/dsrdnflt.h \ + ../../dcmsr/include/dcmtk/dcmsr/dsritcsr.h \ ../../dcmsr/include/dcmtk/dcmsr/dsrcitem.h \ ../../dcmsr/include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmsr/include/dcmtk/dcmsr/dsrscovl.h \ @@ -2442,7 +2444,7 @@ dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ - ../../ofstd/include/dcmtk/ofstd/ofnetdb.h + ../../ofstd/include/dcmtk/ofstd/ofsockad.h dvpsov.o: dvpsov.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpsov.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -2675,31 +2677,24 @@ dvpsovl.o: dvpsovl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ +dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ - ../../ofstd/include/dcmtk/ofstd/offile.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h \ - ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../include/dcmtk/dcmpstat/dvpspl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ + ../include/dcmtk/dcmpstat/dpdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -2715,6 +2710,7 @@ dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ @@ -2728,19 +2724,42 @@ dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ - ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ - ../include/dcmtk/dcmpstat/dvpspl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../include/dcmtk/dcmpstat/dpdefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/dcmimage.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/dimoimg.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcfcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/diovlay.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/diobjcou.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/diovdat.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/diovpln.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/dimopx.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/dipixel.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/dimomod.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/diluptab.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/dibaslut.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/dimoopx.h \ + ../../dcmimgle/include/dcmtk/dcmimgle/didispfn.h \ ../include/dcmtk/dcmpstat/dvpsdef.h \ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ @@ -2755,27 +2774,32 @@ dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ ../../dcmnet/include/dcmtk/dcmnet/assoc.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h -dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h +dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../include/dcmtk/dcmpstat/dvpspl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../include/dcmtk/dcmpstat/dpdefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -2791,7 +2815,6 @@ dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ @@ -2805,42 +2828,19 @@ dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ - ../../ofstd/include/dcmtk/ofstd/offile.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h \ - ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ + ../include/dcmtk/dcmpstat/dvpspl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ + ../include/dcmtk/dcmpstat/dpdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/dcmimage.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/dimoimg.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ - ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcfcache.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/diovlay.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/diobjcou.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/diovdat.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/diovpln.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/dimopx.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/dipixel.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/dimomod.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/diluptab.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/dibaslut.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/dimoopx.h \ - ../../dcmimgle/include/dcmtk/dcmimgle/didispfn.h \ ../include/dcmtk/dcmpstat/dvpsdef.h \ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ @@ -2855,7 +2855,9 @@ dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ ../../dcmnet/include/dcmtk/dcmnet/assoc.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h + ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h dvpspll.o: dvpspll.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpspll.h ../include/dcmtk/dcmpstat/dvpstyp.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ diff --git a/dcmpstat/libsrc/dvpsmsg.cc b/dcmpstat/libsrc/dvpsmsg.cc index 113116d1..b68aaef8 100644 --- a/dcmpstat/libsrc/dvpsmsg.cc +++ b/dcmpstat/libsrc/dvpsmsg.cc @@ -33,7 +33,7 @@ #include "dcmtk/ofstd/ofbmanip.h" /* for OFBitmanipTemplate<> */ #include "dcmtk/dcmdata/dcswap.h" /* for swapIfNecessary() */ #include "dcmtk/dcmnet/dcmtrans.h" /* for class DcmTransportConnection */ -#include "dcmtk/ofstd/ofnetdb.h" +#include "dcmtk/ofstd/ofsockad.h" /* --------------- class DVPSIPCMessage --------------- */ @@ -284,16 +284,11 @@ void DVPSIPCClient::requestConnection() int s = socket(AF_INET, SOCK_STREAM, 0); if (s < 0) return; #endif + OFSockAddr server; + OFStandard::getAddressByHostname("localhost", server); + server.setPort(OFstatic_cast(unsigned short, htons(port))); - OFStandard::OFHostent hp = OFStandard::getHostByName("localhost"); - if (!hp) return; - - struct sockaddr_in server; - server.sin_family = AF_INET; - server.sin_port = (unsigned short) htons(port); - memcpy(&server.sin_addr, hp.h_addr.c_str(), (size_t) hp.h_length); - - if (connect(s, (struct sockaddr *) & server, sizeof(server)) < 0) + if (connect(s, server.getSockaddr(), server.size()) < 0) { #ifdef HAVE_WINSOCK_H (void) shutdown(s, 1 /* SD_SEND */); diff --git a/dcmpstat/libsrc/dvpssp.cc b/dcmpstat/libsrc/dvpssp.cc index 99b0f1a7..0248ab02 100644 --- a/dcmpstat/libsrc/dvpssp.cc +++ b/dcmpstat/libsrc/dvpssp.cc @@ -67,7 +67,7 @@ DVPSStoredPrint::DVPSStoredPrint(Uint16 illumin, Uint16 reflection, const char * , seriesNumber(DCM_SeriesNumber) , manufacturer(DCM_Manufacturer) , originator(DCM_Originator) -, destination(DCM_RETIRED_DestinationAE) +, destination(DCM_DestinationAE) , printerName(DCM_PrinterName) , instanceNumber(DCM_InstanceNumber) , imageDisplayFormat(DCM_ImageDisplayFormat) diff --git a/dcmqrdb/docs/CMakeLists.txt b/dcmqrdb/docs/CMakeLists.txt index 164b3750..06cbf5f5 100644 --- a/dcmqrdb/docs/CMakeLists.txt +++ b/dcmqrdb/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES dcmqrcnf.txt dcmqrset.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) +INSTALL(FILES dcmqrcnf.txt dcmqrset.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git a/dcmqrdb/etc/CMakeLists.txt b/dcmqrdb/etc/CMakeLists.txt index c125eb99..47ba9066 100644 --- a/dcmqrdb/etc/CMakeLists.txt +++ b/dcmqrdb/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES dcmqrscp.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc) +INSTALL(FILES dcmqrscp.cfg DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/dcmtk" COMPONENT etc) diff --git a/dcmqrdb/etc/dcmqrprf.cfg b/dcmqrdb/etc/dcmqrprf.cfg index 6f6b95eb..83cb1d02 100644 --- a/dcmqrdb/etc/dcmqrprf.cfg +++ b/dcmqrdb/etc/dcmqrprf.cfg @@ -276,7 +276,7 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib # Same as "GenericStorageSCP" but limited to non-retired and non-draft SOP Classes. # This allows for accepting (almost) all DICOM Storage SOP Classes that are currently # defined in the standard (an exception is made for some very new DICOM objects because -# of the limitation of 128 Presentation Contexts for SCPs, see DCMTK Feature # 540). +# of the limitation of 128 Presentation Contexts for SCPs, see DCMTK Feature #540). # PresentationContext1 = VerificationSOPClass\Uncompressed # @@ -421,6 +421,7 @@ PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage # - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage # - PatientRadiationDoseSRStorage +# - ProtocolApprovalStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - VolumeRenderingVolumetricPresentationStateStorage # @@ -647,6 +648,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2 # - OphthalmicVisualFieldStaticPerimetryMeasurementsStorage # - ParametricMapStorage # - PatientRadiationDoseSRStorage +# - ProtocolApprovalStorage # - RadiopharmaceuticalRadiationDoseSRStorage # - RealWorldValueMappingStorage # - RespiratoryWaveformStorage @@ -858,6 +860,7 @@ Role127 = DRAFT_WaveformStorage\BOTH # - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage # - ParametricMapStorage # - PatientRadiationDoseSRStorage +# - ProtocolApprovalStorage # - RadiopharmaceuticalRadiationDoseSRStorage # - RTBrachyApplicationSetupDeliveryInstructionStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage @@ -1018,6 +1021,7 @@ Role127 = XRayRadiationDoseSRStorage\BOTH # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage # - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage # - PatientRadiationDoseSRStorage +# - ProtocolApprovalStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - VolumeRenderingVolumetricPresentationStateStorage # diff --git a/dcmqrdb/include/CMakeLists.txt b/dcmqrdb/include/CMakeLists.txt index af4e3008..2d82575e 100644 --- a/dcmqrdb/include/CMakeLists.txt +++ b/dcmqrdb/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmqrdb DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmqrdb DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmqrdb/libsrc/dcmqrcnf.cc b/dcmqrdb/libsrc/dcmqrcnf.cc index 2a5a2b8f..586d3e05 100644 --- a/dcmqrdb/libsrc/dcmqrcnf.cc +++ b/dcmqrdb/libsrc/dcmqrcnf.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2017, OFFIS e.V. + * Copyright (C) 1993-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -601,9 +601,14 @@ int DcmQueryRetrieveConfig::readAETable(FILE *cnffp, int *lineno) CNF_Config.AEEntries[noOfAEEntries - 1].StorageArea = parsevalues(&lineptr); CNF_Config.AEEntries[noOfAEEntries - 1].Access = parsevalues(&lineptr); CNF_Config.AEEntries[noOfAEEntries - 1].StorageQuota = parseQuota(&lineptr); - CNF_Config.AEEntries[noOfAEEntries - 1].Peers = parsePeers(&lineptr, &CNF_Config.AEEntries[noOfAEEntries - 1].noOfPeers); - if (!CNF_Config.AEEntries[noOfAEEntries - 1].noOfPeers) + if ((CNF_Config.AEEntries[noOfAEEntries - 1].StorageQuota->maxStudies == 0) || + (CNF_Config.AEEntries[noOfAEEntries - 1].StorageQuota->maxBytesPerStudy == 0)) error = 1; + else + { + CNF_Config.AEEntries[noOfAEEntries - 1].Peers = parsePeers(&lineptr, &CNF_Config.AEEntries[noOfAEEntries - 1].noOfPeers); + if (!CNF_Config.AEEntries[noOfAEEntries - 1].noOfPeers) error = 1; + } } if (!end) { @@ -625,9 +630,15 @@ DcmQueryRetrieveConfigQuota *DcmQueryRetrieveConfig::parseQuota(char **valuehand if ((helpquota = (DcmQueryRetrieveConfigQuota *)malloc(sizeof(DcmQueryRetrieveConfigQuota))) == NULL) panic("Memory allocation 4"); helpvalue = parsevalues(valuehandle); - sscanf(helpvalue, "%d , %s", &studies, helpval); - helpquota->maxStudies = studies; - helpquota->maxBytesPerStudy = quota(helpval); + if (helpvalue) + { + sscanf(helpvalue, "%d , %s", &studies, helpval); + helpquota->maxStudies = studies; + helpquota->maxBytesPerStudy = quota(helpval); + } else { + helpquota->maxStudies = 0; + helpquota->maxBytesPerStudy = 0; + } free(helpvalue); return(helpquota); diff --git a/dcmqrdb/libsrc/dcmqrtis.cc b/dcmqrdb/libsrc/dcmqrtis.cc index a3c3bfc3..b7b09a24 100644 --- a/dcmqrdb/libsrc/dcmqrtis.cc +++ b/dcmqrdb/libsrc/dcmqrtis.cc @@ -890,11 +890,11 @@ OFBool DcmQueryRetrieveTelnetInitiator::TI_remoteFindQuery(TI_DBEntry *db, DcmDa req.MessageID = msgId; strcpy(req.AffectedSOPClassUID, - UID_FINDStudyRootQueryRetrieveInformationModel); - req.Priority = DIMSE_PRIORITY_LOW; + UID_FINDStudyRootQueryRetrieveInformationModel); + req.Priority = DIMSE_PRIORITY_MEDIUM; cond = DIMSE_findUser(assoc, presId, &req, query, - findCallback, &cbd, blockMode_, dimse_timeout_, &rsp, &stDetail); + findCallback, &cbd, blockMode_, dimse_timeout_, &rsp, &stDetail); if (cond.good()) { OFString temp_str; diff --git a/dcmrt/apps/Makefile.dep b/dcmrt/apps/Makefile.dep index 179618ec..816a7084 100644 --- a/dcmrt/apps/Makefile.dep +++ b/dcmrt/apps/Makefile.dep @@ -117,6 +117,7 @@ drtdump.o: drtdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -217,13 +218,13 @@ drtdump.o: drtdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtcps.h \ ../include/dcmtk/dcmrt/seq/drtbldps.h \ ../include/dcmtk/dcmrt/seq/drtrdrs1.h \ + ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrds.h ../include/dcmtk/dcmrt/seq/drtwps.h \ ../include/dcmtk/dcmrt/seq/drtpvis.h \ ../include/dcmtk/dcmrt/seq/drtrbos1.h \ ../include/dcmtk/dcmrt/seq/drtrris1.h ../include/dcmtk/dcmrt/seq/drtws.h \ ../include/dcmtk/dcmrt/seq/drtdrs.h ../include/dcmtk/dcmrt/seq/drtfgs.h \ ../include/dcmtk/dcmrt/seq/drtrbs8.h \ - ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrbas8.h \ ../include/dcmtk/dcmrt/seq/drtrdrs8.h \ ../include/dcmtk/dcmrt/seq/drtpss.h ../include/dcmtk/dcmrt/seq/drtfds.h \ diff --git a/dcmrt/include/CMakeLists.txt b/dcmrt/include/CMakeLists.txt index 1fe1b841..40d36015 100644 --- a/dcmrt/include/CMakeLists.txt +++ b/dcmrt/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmrt DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmrt DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmrt/include/dcmtk/dcmrt/drtdose.h b/dcmrt/include/dcmtk/dcmrt/drtdose.h index 01d03fd8..bdff02bc 100644 --- a/dcmrt/include/dcmtk/dcmrt/drtdose.h +++ b/dcmrt/include/dcmtk/dcmrt/drtdose.h @@ -6,8 +6,8 @@ * * Header file for class DRTDoseIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -895,6 +895,13 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD */ virtual OFCondition getLastMenstrualDate(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalEventType (0012,0053) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalEventType(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalInformationModified (0028,0303) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -902,6 +909,13 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD */ virtual OFCondition getLongitudinalTemporalInformationModified(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos = 0) const; + /** get LossyImageCompression (0028,2110) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -1068,13 +1082,6 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD */ virtual OFCondition getOriginalSpecializedSOPClassUID(OFString &value, const signed long pos = 0) const; - /** get OtherPatientIDs (0010,1000) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1), -1 for all components - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getOtherPatientIDs(OFString &value, const signed long pos = 0) const; - /** get OtherPatientNames (0010,1001) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -3180,6 +3187,13 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD */ virtual OFCondition setLastMenstrualDate(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalEventType (0012,0053) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalEventType(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalInformationModified (0028,0303) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -3187,6 +3201,13 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD */ virtual OFCondition setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value value to be set (should be valid for this VR) + * @param pos index of the value to be set (0..vm-1), vm=1 + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos = 0); + /** set LossyImageCompression (0028,2110) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -3299,13 +3320,6 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD */ virtual OFCondition setOriginalSpecializedSOPClassUID(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientIDs (0010,1000) - * @param value value to be set (possibly multi-valued) or "" for no value - * @param check check 'value' for conformance with VR (LO) and VM (1-n) if enabled - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setOtherPatientIDs(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientNames (0010,1001) * @param value value to be set (possibly multi-valued) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1-n) if enabled @@ -4086,8 +4100,6 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD DRTReferencedPatientSequence ReferencedPatientSequence; /// PatientBirthTime (0010,0032) vr=TM, vm=1, type=3 DcmTime PatientBirthTime; - /// OtherPatientIDs (0010,1000) vr=LO, vm=1-n, type=3 - DcmLongString OtherPatientIDs; /// OtherPatientIDsSequence (0010,1002) vr=SQ, vm=1, type=3 DRTOtherPatientIDsSequence OtherPatientIDsSequence; /// OtherPatientNames (0010,1001) vr=PN, vm=1-n, type=3 @@ -4252,6 +4264,10 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD DcmLongString ClinicalTrialTimePointID; /// ClinicalTrialTimePointDescription (0012,0051) vr=ST, vm=1, type=3 DcmShortText ClinicalTrialTimePointDescription; + /// LongitudinalTemporalOffsetFromEvent (0012,0052) vr=FD, vm=1, type=3 + DcmFloatingPointDouble LongitudinalTemporalOffsetFromEvent; + /// LongitudinalTemporalEventType (0012,0053) vr=CS, vm=1, type=1C + DcmCodeString LongitudinalTemporalEventType; /// ConsentForClinicalTrialUseSequence (0012,0083) vr=SQ, vm=1, type=3 DRTConsentForClinicalTrialUseSequence ConsentForClinicalTrialUseSequence; @@ -4350,10 +4366,12 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD // DcmIntegerString InstanceNumber; /// PatientOrientation (0020,0020) vr=CS, vm=2, type=2C DcmCodeString PatientOrientation; - /// ContentDate (0008,0023) vr=DA, vm=1, type=2C - DcmDate ContentDate; - /// ContentTime (0008,0033) vr=TM, vm=1, type=2C - DcmTime ContentTime; + // ContentDate (0008,0023) vr=DA, vm=1, type=2C + // - also defined in: RTDoseModule + // DcmDate ContentDate; + // ContentTime (0008,0033) vr=TM, vm=1, type=2C + // - also defined in: RTDoseModule + // DcmTime ContentTime; /// ImageType (0008,0008) vr=CS, vm=2-n, type=3 DcmCodeString ImageType; /// AcquisitionNumber (0020,0012) vr=IS, vm=1, type=3 @@ -4533,6 +4551,12 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD /// PixelRepresentation (0028,0103) vr=US, vm=1, type=1C /// - also defined in: ImagePixelModule DcmUnsignedShort PixelRepresentation; + /// ContentDate (0008,0023) vr=DA, vm=1, type=3 + /// - also defined in: GeneralImageModule + DcmDate ContentDate; + /// ContentTime (0008,0033) vr=TM, vm=1, type=3 + /// - also defined in: GeneralImageModule + DcmTime ContentTime; /// DoseUnits (3004,0002) vr=CS, vm=1, type=1 DcmCodeString DoseUnits; /// DoseType (3004,0004) vr=CS, vm=1, type=1 diff --git a/dcmrt/include/dcmtk/dcmrt/drtimage.h b/dcmrt/include/dcmtk/dcmrt/drtimage.h index 4d200b48..d655a9dc 100644 --- a/dcmrt/include/dcmtk/dcmrt/drtimage.h +++ b/dcmrt/include/dcmtk/dcmrt/drtimage.h @@ -6,8 +6,8 @@ * * Header file for class DRTImageIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -1103,6 +1103,13 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD */ virtual OFCondition getLastMenstrualDate(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalEventType (0012,0053) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalEventType(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalInformationModified (0028,0303) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -1110,6 +1117,13 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD */ virtual OFCondition getLongitudinalTemporalInformationModified(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos = 0) const; + /** get LossyImageCompression (0028,2110) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -1256,13 +1270,6 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD */ virtual OFCondition getOriginalSpecializedSOPClassUID(OFString &value, const signed long pos = 0) const; - /** get OtherPatientIDs (0010,1000) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1), -1 for all components - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getOtherPatientIDs(OFString &value, const signed long pos = 0) const; - /** get OtherPatientNames (0010,1001) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -3768,6 +3775,13 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD */ virtual OFCondition setLastMenstrualDate(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalEventType (0012,0053) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalEventType(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalInformationModified (0028,0303) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -3775,6 +3789,13 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD */ virtual OFCondition setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value value to be set (should be valid for this VR) + * @param pos index of the value to be set (0..vm-1), vm=1 + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos = 0); + /** set LossyImageCompression (0028,2110) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -3880,13 +3901,6 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD */ virtual OFCondition setOriginalSpecializedSOPClassUID(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientIDs (0010,1000) - * @param value value to be set (possibly multi-valued) or "" for no value - * @param check check 'value' for conformance with VR (LO) and VM (1-n) if enabled - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setOtherPatientIDs(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientNames (0010,1001) * @param value value to be set (possibly multi-valued) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1-n) if enabled @@ -4789,8 +4803,6 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD DRTReferencedPatientSequence ReferencedPatientSequence; /// PatientBirthTime (0010,0032) vr=TM, vm=1, type=3 DcmTime PatientBirthTime; - /// OtherPatientIDs (0010,1000) vr=LO, vm=1-n, type=3 - DcmLongString OtherPatientIDs; /// OtherPatientIDsSequence (0010,1002) vr=SQ, vm=1, type=3 DRTOtherPatientIDsSequence OtherPatientIDsSequence; /// OtherPatientNames (0010,1001) vr=PN, vm=1-n, type=3 @@ -4955,6 +4967,10 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD DcmLongString ClinicalTrialTimePointID; /// ClinicalTrialTimePointDescription (0012,0051) vr=ST, vm=1, type=3 DcmShortText ClinicalTrialTimePointDescription; + /// LongitudinalTemporalOffsetFromEvent (0012,0052) vr=FD, vm=1, type=3 + DcmFloatingPointDouble LongitudinalTemporalOffsetFromEvent; + /// LongitudinalTemporalEventType (0012,0053) vr=CS, vm=1, type=1C + DcmCodeString LongitudinalTemporalEventType; /// ConsentForClinicalTrialUseSequence (0012,0083) vr=SQ, vm=1, type=3 DRTConsentForClinicalTrialUseSequence ConsentForClinicalTrialUseSequence; diff --git a/dcmrt/include/dcmtk/dcmrt/drtionpl.h b/dcmrt/include/dcmtk/dcmrt/drtionpl.h index 09c3ad8c..88698e53 100644 --- a/dcmrt/include/dcmtk/dcmrt/drtionpl.h +++ b/dcmrt/include/dcmtk/dcmrt/drtionpl.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonPlanIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -555,6 +555,13 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD */ virtual OFCondition getLastMenstrualDate(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalEventType (0012,0053) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalEventType(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalInformationModified (0028,0303) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -562,6 +569,13 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD */ virtual OFCondition getLongitudinalTemporalInformationModified(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos = 0) const; + /** get Manufacturer (0008,0070) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -646,13 +660,6 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD */ virtual OFCondition getOriginalSpecializedSOPClassUID(OFString &value, const signed long pos = 0) const; - /** get OtherPatientIDs (0010,1000) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1), -1 for all components - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getOtherPatientIDs(OFString &value, const signed long pos = 0) const; - /** get OtherPatientNames (0010,1001) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -2226,6 +2233,13 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD */ virtual OFCondition setLastMenstrualDate(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalEventType (0012,0053) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalEventType(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalInformationModified (0028,0303) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -2233,6 +2247,13 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD */ virtual OFCondition setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value value to be set (should be valid for this VR) + * @param pos index of the value to be set (0..vm-1), vm=1 + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos = 0); + /** set Manufacturer (0008,0070) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (LO) and VM (1) if enabled @@ -2303,13 +2324,6 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD */ virtual OFCondition setOriginalSpecializedSOPClassUID(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientIDs (0010,1000) - * @param value value to be set (possibly multi-valued) or "" for no value - * @param check check 'value' for conformance with VR (LO) and VM (1-n) if enabled - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setOtherPatientIDs(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientNames (0010,1001) * @param value value to be set (possibly multi-valued) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1-n) if enabled @@ -2890,8 +2904,6 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD DRTReferencedPatientSequence ReferencedPatientSequence; /// PatientBirthTime (0010,0032) vr=TM, vm=1, type=3 DcmTime PatientBirthTime; - /// OtherPatientIDs (0010,1000) vr=LO, vm=1-n, type=3 - DcmLongString OtherPatientIDs; /// OtherPatientIDsSequence (0010,1002) vr=SQ, vm=1, type=3 DRTOtherPatientIDsSequence OtherPatientIDsSequence; /// OtherPatientNames (0010,1001) vr=PN, vm=1-n, type=3 @@ -3056,6 +3068,10 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD DcmLongString ClinicalTrialTimePointID; /// ClinicalTrialTimePointDescription (0012,0051) vr=ST, vm=1, type=3 DcmShortText ClinicalTrialTimePointDescription; + /// LongitudinalTemporalOffsetFromEvent (0012,0052) vr=FD, vm=1, type=3 + DcmFloatingPointDouble LongitudinalTemporalOffsetFromEvent; + /// LongitudinalTemporalEventType (0012,0053) vr=CS, vm=1, type=1C + DcmCodeString LongitudinalTemporalEventType; /// ConsentForClinicalTrialUseSequence (0012,0083) vr=SQ, vm=1, type=3 DRTConsentForClinicalTrialUseSequence ConsentForClinicalTrialUseSequence; diff --git a/dcmrt/include/dcmtk/dcmrt/drtiontr.h b/dcmrt/include/dcmtk/dcmrt/drtiontr.h index d9ca8b84..ae4e896e 100644 --- a/dcmrt/include/dcmtk/dcmrt/drtiontr.h +++ b/dcmrt/include/dcmtk/dcmrt/drtiontr.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonBeamsTreatmentRecordIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -534,6 +534,13 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD */ virtual OFCondition getLastMenstrualDate(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalEventType (0012,0053) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalEventType(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalInformationModified (0028,0303) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -541,6 +548,13 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD */ virtual OFCondition getLongitudinalTemporalInformationModified(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos = 0) const; + /** get Manufacturer (0008,0070) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -646,13 +660,6 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD */ virtual OFCondition getOriginalSpecializedSOPClassUID(OFString &value, const signed long pos = 0) const; - /** get OtherPatientIDs (0010,1000) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1), -1 for all components - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getOtherPatientIDs(OFString &value, const signed long pos = 0) const; - /** get OtherPatientNames (0010,1001) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -2187,6 +2194,13 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD */ virtual OFCondition setLastMenstrualDate(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalEventType (0012,0053) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalEventType(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalInformationModified (0028,0303) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -2194,6 +2208,13 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD */ virtual OFCondition setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value value to be set (should be valid for this VR) + * @param pos index of the value to be set (0..vm-1), vm=1 + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos = 0); + /** set Manufacturer (0008,0070) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (LO) and VM (1) if enabled @@ -2278,13 +2299,6 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD */ virtual OFCondition setOriginalSpecializedSOPClassUID(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientIDs (0010,1000) - * @param value value to be set (possibly multi-valued) or "" for no value - * @param check check 'value' for conformance with VR (LO) and VM (1-n) if enabled - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setOtherPatientIDs(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientNames (0010,1001) * @param value value to be set (possibly multi-valued) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1-n) if enabled @@ -2802,8 +2816,6 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD DRTReferencedPatientSequence ReferencedPatientSequence; /// PatientBirthTime (0010,0032) vr=TM, vm=1, type=3 DcmTime PatientBirthTime; - /// OtherPatientIDs (0010,1000) vr=LO, vm=1-n, type=3 - DcmLongString OtherPatientIDs; /// OtherPatientIDsSequence (0010,1002) vr=SQ, vm=1, type=3 DRTOtherPatientIDsSequence OtherPatientIDsSequence; /// OtherPatientNames (0010,1001) vr=PN, vm=1-n, type=3 @@ -2919,6 +2931,10 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD DcmLongString ClinicalTrialTimePointID; /// ClinicalTrialTimePointDescription (0012,0051) vr=ST, vm=1, type=3 DcmShortText ClinicalTrialTimePointDescription; + /// LongitudinalTemporalOffsetFromEvent (0012,0052) vr=FD, vm=1, type=3 + DcmFloatingPointDouble LongitudinalTemporalOffsetFromEvent; + /// LongitudinalTemporalEventType (0012,0053) vr=CS, vm=1, type=1C + DcmCodeString LongitudinalTemporalEventType; /// ConsentForClinicalTrialUseSequence (0012,0083) vr=SQ, vm=1, type=3 DRTConsentForClinicalTrialUseSequence ConsentForClinicalTrialUseSequence; diff --git a/dcmrt/include/dcmtk/dcmrt/drtplan.h b/dcmrt/include/dcmtk/dcmrt/drtplan.h index eb15743d..27ccd819 100644 --- a/dcmrt/include/dcmtk/dcmrt/drtplan.h +++ b/dcmrt/include/dcmtk/dcmrt/drtplan.h @@ -6,8 +6,8 @@ * * Header file for class DRTPlanIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -588,6 +588,13 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD */ virtual OFCondition getLastMenstrualDate(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalEventType (0012,0053) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalEventType(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalInformationModified (0028,0303) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -595,6 +602,13 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD */ virtual OFCondition getLongitudinalTemporalInformationModified(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos = 0) const; + /** get Manufacturer (0008,0070) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -679,13 +693,6 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD */ virtual OFCondition getOriginalSpecializedSOPClassUID(OFString &value, const signed long pos = 0) const; - /** get OtherPatientIDs (0010,1000) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1), -1 for all components - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getOtherPatientIDs(OFString &value, const signed long pos = 0) const; - /** get OtherPatientNames (0010,1001) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -2309,6 +2316,13 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD */ virtual OFCondition setLastMenstrualDate(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalEventType (0012,0053) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalEventType(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalInformationModified (0028,0303) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -2316,6 +2330,13 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD */ virtual OFCondition setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value value to be set (should be valid for this VR) + * @param pos index of the value to be set (0..vm-1), vm=1 + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos = 0); + /** set Manufacturer (0008,0070) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (LO) and VM (1) if enabled @@ -2386,13 +2407,6 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD */ virtual OFCondition setOriginalSpecializedSOPClassUID(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientIDs (0010,1000) - * @param value value to be set (possibly multi-valued) or "" for no value - * @param check check 'value' for conformance with VR (LO) and VM (1-n) if enabled - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setOtherPatientIDs(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientNames (0010,1001) * @param value value to be set (possibly multi-valued) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1-n) if enabled @@ -2973,8 +2987,6 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD DRTReferencedPatientSequence ReferencedPatientSequence; /// PatientBirthTime (0010,0032) vr=TM, vm=1, type=3 DcmTime PatientBirthTime; - /// OtherPatientIDs (0010,1000) vr=LO, vm=1-n, type=3 - DcmLongString OtherPatientIDs; /// OtherPatientIDsSequence (0010,1002) vr=SQ, vm=1, type=3 DRTOtherPatientIDsSequence OtherPatientIDsSequence; /// OtherPatientNames (0010,1001) vr=PN, vm=1-n, type=3 @@ -3139,6 +3151,10 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD DcmLongString ClinicalTrialTimePointID; /// ClinicalTrialTimePointDescription (0012,0051) vr=ST, vm=1, type=3 DcmShortText ClinicalTrialTimePointDescription; + /// LongitudinalTemporalOffsetFromEvent (0012,0052) vr=FD, vm=1, type=3 + DcmFloatingPointDouble LongitudinalTemporalOffsetFromEvent; + /// LongitudinalTemporalEventType (0012,0053) vr=CS, vm=1, type=1C + DcmCodeString LongitudinalTemporalEventType; /// ConsentForClinicalTrialUseSequence (0012,0083) vr=SQ, vm=1, type=3 DRTConsentForClinicalTrialUseSequence ConsentForClinicalTrialUseSequence; diff --git a/dcmrt/include/dcmtk/dcmrt/drtstrct.h b/dcmrt/include/dcmtk/dcmrt/drtstrct.h index 051f0342..8647e4f3 100644 --- a/dcmrt/include/dcmtk/dcmrt/drtstrct.h +++ b/dcmrt/include/dcmtk/dcmrt/drtstrct.h @@ -6,8 +6,8 @@ * * Header file for class DRTStructureSetIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -513,6 +513,13 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD */ virtual OFCondition getLastMenstrualDate(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalEventType (0012,0053) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalEventType(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalInformationModified (0028,0303) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -520,6 +527,13 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD */ virtual OFCondition getLongitudinalTemporalInformationModified(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos = 0) const; + /** get Manufacturer (0008,0070) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -604,13 +618,6 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD */ virtual OFCondition getOriginalSpecializedSOPClassUID(OFString &value, const signed long pos = 0) const; - /** get OtherPatientIDs (0010,1000) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1), -1 for all components - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getOtherPatientIDs(OFString &value, const signed long pos = 0) const; - /** get OtherPatientNames (0010,1001) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -2106,6 +2113,13 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD */ virtual OFCondition setLastMenstrualDate(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalEventType (0012,0053) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalEventType(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalInformationModified (0028,0303) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -2113,6 +2127,13 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD */ virtual OFCondition setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value value to be set (should be valid for this VR) + * @param pos index of the value to be set (0..vm-1), vm=1 + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos = 0); + /** set Manufacturer (0008,0070) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (LO) and VM (1) if enabled @@ -2183,13 +2204,6 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD */ virtual OFCondition setOriginalSpecializedSOPClassUID(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientIDs (0010,1000) - * @param value value to be set (possibly multi-valued) or "" for no value - * @param check check 'value' for conformance with VR (LO) and VM (1-n) if enabled - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setOtherPatientIDs(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientNames (0010,1001) * @param value value to be set (possibly multi-valued) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1-n) if enabled @@ -2735,8 +2749,6 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD DRTReferencedPatientSequence ReferencedPatientSequence; /// PatientBirthTime (0010,0032) vr=TM, vm=1, type=3 DcmTime PatientBirthTime; - /// OtherPatientIDs (0010,1000) vr=LO, vm=1-n, type=3 - DcmLongString OtherPatientIDs; /// OtherPatientIDsSequence (0010,1002) vr=SQ, vm=1, type=3 DRTOtherPatientIDsSequence OtherPatientIDsSequence; /// OtherPatientNames (0010,1001) vr=PN, vm=1-n, type=3 @@ -2901,6 +2913,10 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD DcmLongString ClinicalTrialTimePointID; /// ClinicalTrialTimePointDescription (0012,0051) vr=ST, vm=1, type=3 DcmShortText ClinicalTrialTimePointDescription; + /// LongitudinalTemporalOffsetFromEvent (0012,0052) vr=FD, vm=1, type=3 + DcmFloatingPointDouble LongitudinalTemporalOffsetFromEvent; + /// LongitudinalTemporalEventType (0012,0053) vr=CS, vm=1, type=1C + DcmCodeString LongitudinalTemporalEventType; /// ConsentForClinicalTrialUseSequence (0012,0083) vr=SQ, vm=1, type=3 DRTConsentForClinicalTrialUseSequence ConsentForClinicalTrialUseSequence; diff --git a/dcmrt/include/dcmtk/dcmrt/drttreat.h b/dcmrt/include/dcmtk/dcmrt/drttreat.h index fa62effe..0eb66a22 100644 --- a/dcmrt/include/dcmtk/dcmrt/drttreat.h +++ b/dcmrt/include/dcmtk/dcmrt/drttreat.h @@ -6,8 +6,8 @@ * * Header file for class DRTTreatmentSummaryRecordIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -497,6 +497,13 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD */ virtual OFCondition getLastMenstrualDate(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalEventType (0012,0053) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalEventType(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalInformationModified (0028,0303) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -504,6 +511,13 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD */ virtual OFCondition getLongitudinalTemporalInformationModified(OFString &value, const signed long pos = 0) const; + /** get LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos = 0) const; + /** get Manufacturer (0008,0070) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -595,13 +609,6 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD */ virtual OFCondition getOriginalSpecializedSOPClassUID(OFString &value, const signed long pos = 0) const; - /** get OtherPatientIDs (0010,1000) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1), -1 for all components - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition getOtherPatientIDs(OFString &value, const signed long pos = 0) const; - /** get OtherPatientNames (0010,1001) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -2055,6 +2062,13 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD */ virtual OFCondition setLastMenstrualDate(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalEventType (0012,0053) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalEventType(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalInformationModified (0028,0303) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -2062,6 +2076,13 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD */ virtual OFCondition setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check = OFTrue); + /** set LongitudinalTemporalOffsetFromEvent (0012,0052) + * @param value value to be set (should be valid for this VR) + * @param pos index of the value to be set (0..vm-1), vm=1 + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos = 0); + /** set Manufacturer (0008,0070) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (LO) and VM (1) if enabled @@ -2139,13 +2160,6 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD */ virtual OFCondition setOriginalSpecializedSOPClassUID(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientIDs (0010,1000) - * @param value value to be set (possibly multi-valued) or "" for no value - * @param check check 'value' for conformance with VR (LO) and VM (1-n) if enabled - * @return status, EC_Normal if successful, an error code otherwise - */ - virtual OFCondition setOtherPatientIDs(const OFString &value, const OFBool check = OFTrue); - /** set OtherPatientNames (0010,1001) * @param value value to be set (possibly multi-valued) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1-n) if enabled @@ -2649,8 +2663,6 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD DRTReferencedPatientSequence ReferencedPatientSequence; /// PatientBirthTime (0010,0032) vr=TM, vm=1, type=3 DcmTime PatientBirthTime; - /// OtherPatientIDs (0010,1000) vr=LO, vm=1-n, type=3 - DcmLongString OtherPatientIDs; /// OtherPatientIDsSequence (0010,1002) vr=SQ, vm=1, type=3 DRTOtherPatientIDsSequence OtherPatientIDsSequence; /// OtherPatientNames (0010,1001) vr=PN, vm=1-n, type=3 @@ -2815,6 +2827,10 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD DcmLongString ClinicalTrialTimePointID; /// ClinicalTrialTimePointDescription (0012,0051) vr=ST, vm=1, type=3 DcmShortText ClinicalTrialTimePointDescription; + /// LongitudinalTemporalOffsetFromEvent (0012,0052) vr=FD, vm=1, type=3 + DcmFloatingPointDouble LongitudinalTemporalOffsetFromEvent; + /// LongitudinalTemporalEventType (0012,0053) vr=CS, vm=1, type=1C + DcmCodeString LongitudinalTemporalEventType; /// ConsentForClinicalTrialUseSequence (0012,0083) vr=SQ, vm=1, type=3 DRTConsentForClinicalTrialUseSequence ConsentForClinicalTrialUseSequence; diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h index 57307399..8f5703f1 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTAssigningAgencyOrDepartmentCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h index da4ef0a1..b2455fb5 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTAdmittingDiagnosesCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtads.h b/dcmrt/include/dcmtk/dcmrt/seq/drtads.h index 1df0fdbf..6dcdb3ea 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtads.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtads.h @@ -6,8 +6,8 @@ * * Header file for class DRTAdditionalDrugSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtafs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtafs.h index 27563044..77fb4471 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtafs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtafs.h @@ -6,8 +6,8 @@ * * Header file for class DRTAssigningFacilitySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtags.h b/dcmrt/include/dcmtk/dcmrt/seq/drtags.h index 340e2188..e0603148 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtags.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtags.h @@ -6,8 +6,8 @@ * * Header file for class DRTApplicatorGeometrySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h index e5153fa1..c6cb534f 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTAssigningJurisdictionCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtas1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtas1.h index aa39af88..bc67f35b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtas1.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtas1.h @@ -6,8 +6,8 @@ * * Header file for class DRTApplicatorSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtas5.h b/dcmrt/include/dcmtk/dcmrt/seq/drtas5.h index de8aa116..c1f5801d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtas5.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtas5.h @@ -6,8 +6,8 @@ * * Header file for class DRTApplicatorSequenceInRTImageModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtas6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtas6.h index e18874f4..8a152461 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtas6.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtas6.h @@ -6,8 +6,8 @@ * * Header file for class DRTApplicatorSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtas7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtas7.h index 86945b6c..e51cdb3a 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtas7.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtas7.h @@ -6,8 +6,8 @@ * * Header file for class DRTApplicatorSequenceInRTIonBeamsSessionRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtass.h b/dcmrt/include/dcmtk/dcmrt/seq/drtass.h index 0402e3d5..95ba2669 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtass.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtass.h @@ -6,8 +6,8 @@ * * Header file for class DRTApplicationSetupSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbads.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbads.h index 33dd65fc..50c29c48 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbads.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbads.h @@ -6,8 +6,8 @@ * * Header file for class DRTBrachyAccessoryDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbas.h index 2b870517..d94f73f9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbas.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbas.h @@ -6,8 +6,8 @@ * * Header file for class DRTContrastBolusAgentSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h index fc80741d..5c2c0014 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h @@ -6,8 +6,8 @@ * * Header file for class DRTBrachyControlPointSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h index 67722cba..33379436 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h @@ -6,8 +6,8 @@ * * Header file for class DRTBlockSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h index 77d22910..b47979eb 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h @@ -6,8 +6,8 @@ * * Header file for class DRTBlockSequenceInRTImageModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h index f1606426..af23c7f0 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h @@ -6,8 +6,8 @@ * * Header file for class DRTBeamLimitingDeviceLeafPairsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h index b3d2c571..eba370be 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h @@ -6,8 +6,8 @@ * * Header file for class DRTBeamLimitingDevicePositionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h index 3d4399ed..17fc23e4 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h @@ -6,8 +6,8 @@ * * Header file for class DRTBeamLimitingDeviceSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h b/dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h index e8276f29..99b0ed98 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h @@ -6,8 +6,8 @@ * * Header file for class DRTBeamLimitingDeviceSequenceInRTImageModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h index 8a0103d0..fe047fc6 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h @@ -6,8 +6,8 @@ * * Header file for class DRTBeamLimitingDeviceSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h index 2bb583ff..3478e578 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h @@ -6,8 +6,8 @@ * * Header file for class DRTBeamLimitingDeviceToleranceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h index 8da47e7d..ce8a4d6d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h @@ -6,8 +6,8 @@ * * Header file for class DRTBreedRegistryCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h index 4870008d..d1227143 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTBrachyReferencedDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h index a026a1f9..021e4bc7 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTBreedRegistrationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbs.h index f9cf9e78..be213429 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbs.h @@ -6,8 +6,8 @@ * * Header file for class DRTBeamSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -28,6 +28,7 @@ #include "dcmtk/dcmrt/seq/drtpvis.h" // for PlannedVerificationImageSequence #include "dcmtk/dcmrt/seq/drtpfms.h" // for PrimaryFluenceModeSequence #include "dcmtk/dcmrt/seq/drtrbos1.h" // for ReferencedBolusSequence +#include "dcmtk/dcmrt/seq/drtrdrs1.h" // for ReferencedDoseReferenceSequence #include "dcmtk/dcmrt/seq/drtrds.h" // for ReferencedDoseSequence #include "dcmtk/dcmrt/seq/drtrris1.h" // for ReferencedReferenceImageSequence #include "dcmtk/dcmrt/seq/drtws.h" // for WedgeSequence @@ -479,6 +480,18 @@ class DCMTK_DCMRT_EXPORT DRTBeamSequence const DRTReferencedBolusSequenceInRTBeamsModule &getReferencedBolusSequence() const { return ReferencedBolusSequence; } + /** get ReferencedDoseReferenceSequence (300c,0050) + * @return reference to sequence element + */ + DRTReferencedDoseReferenceSequenceInRTBeamsModule &getReferencedDoseReferenceSequence() + { return ReferencedDoseReferenceSequence; } + + /** get ReferencedDoseReferenceSequence (300c,0050) + * @return const reference to sequence element + */ + const DRTReferencedDoseReferenceSequenceInRTBeamsModule &getReferencedDoseReferenceSequence() const + { return ReferencedDoseReferenceSequence; } + /** get ReferencedDoseSequence (300c,0080) * @return reference to sequence element */ @@ -760,6 +773,8 @@ class DCMTK_DCMRT_EXPORT DRTBeamSequence DcmCodeString RadiationType; /// ReferencedBolusSequence (300c,00b0) vr=SQ, vm=1, type=1C DRTReferencedBolusSequenceInRTBeamsModule ReferencedBolusSequence; + /// ReferencedDoseReferenceSequence (300c,0050) vr=SQ, vm=1, type=3 + DRTReferencedDoseReferenceSequenceInRTBeamsModule ReferencedDoseReferenceSequence; /// ReferencedDoseSequence (300c,0080) vr=SQ, vm=1, type=3 DRTReferencedDoseSequence ReferencedDoseSequence; /// ReferencedPatientSetupNumber (300c,006a) vr=IS, vm=1, type=3 diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbss.h index c4889b62..c31576db 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbss.h @@ -6,8 +6,8 @@ * * Header file for class DRTBlockSlabSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h index 25c72d64..eae819a9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h @@ -6,8 +6,8 @@ * * Header file for class DRTBeamDoseVerificationControlPointSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -91,33 +91,26 @@ class DCMTK_DCMRT_EXPORT DRTBeamDoseVerificationControlPointSequence // --- get DICOM attribute values --- - /** get AverageBeamDosePointDepth (300a,008d) + /** get BeamDosePointDepth (300a,0088) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1) * @return status, EC_Normal if successful, an error code otherwise */ - OFCondition getAverageBeamDosePointDepth(Float32 &value, const unsigned long pos = 0) const; + OFCondition getBeamDosePointDepth(Float32 &value, const unsigned long pos = 0) const; - /** get AverageBeamDosePointEquivalentDepth (300a,008e) + /** get BeamDosePointEquivalentDepth (300a,0089) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1) * @return status, EC_Normal if successful, an error code otherwise */ - OFCondition getAverageBeamDosePointEquivalentDepth(Float32 &value, const unsigned long pos = 0) const; + OFCondition getBeamDosePointEquivalentDepth(Float32 &value, const unsigned long pos = 0) const; - /** get AverageBeamDosePointSSD (300a,008f) + /** get BeamDosePointSSD (300a,008a) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1) * @return status, EC_Normal if successful, an error code otherwise */ - OFCondition getAverageBeamDosePointSSD(Float32 &value, const unsigned long pos = 0) const; - - /** get AverageBeamDosePointSourceToExternalContourDistance (300a,0131) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1) - * @return status, EC_Normal if successful, an error code otherwise - */ - OFCondition getAverageBeamDosePointSourceToExternalContourDistance(Float32 &value, const unsigned long pos = 0) const; + OFCondition getBeamDosePointSSD(Float32 &value, const unsigned long pos = 0) const; /** get CumulativeMetersetWeight (300a,0134) * @param value reference to variable in which the value should be stored @@ -149,33 +142,26 @@ class DCMTK_DCMRT_EXPORT DRTBeamDoseVerificationControlPointSequence // --- set DICOM attribute values --- - /** set AverageBeamDosePointDepth (300a,008d) - * @param value value to be set (should be valid for this VR) - * @param pos index of the value to be set (0..vm-1), vm=1 - * @return status, EC_Normal if successful, an error code otherwise - */ - OFCondition setAverageBeamDosePointDepth(const Float32 value, const unsigned long pos = 0); - - /** set AverageBeamDosePointEquivalentDepth (300a,008e) + /** set BeamDosePointDepth (300a,0088) * @param value value to be set (should be valid for this VR) * @param pos index of the value to be set (0..vm-1), vm=1 * @return status, EC_Normal if successful, an error code otherwise */ - OFCondition setAverageBeamDosePointEquivalentDepth(const Float32 value, const unsigned long pos = 0); + OFCondition setBeamDosePointDepth(const Float32 value, const unsigned long pos = 0); - /** set AverageBeamDosePointSSD (300a,008f) + /** set BeamDosePointEquivalentDepth (300a,0089) * @param value value to be set (should be valid for this VR) * @param pos index of the value to be set (0..vm-1), vm=1 * @return status, EC_Normal if successful, an error code otherwise */ - OFCondition setAverageBeamDosePointSSD(const Float32 value, const unsigned long pos = 0); + OFCondition setBeamDosePointEquivalentDepth(const Float32 value, const unsigned long pos = 0); - /** set AverageBeamDosePointSourceToExternalContourDistance (300a,0131) + /** set BeamDosePointSSD (300a,008a) * @param value value to be set (should be valid for this VR) * @param pos index of the value to be set (0..vm-1), vm=1 * @return status, EC_Normal if successful, an error code otherwise */ - OFCondition setAverageBeamDosePointSourceToExternalContourDistance(const Float32 value, const unsigned long pos = 0); + OFCondition setBeamDosePointSSD(const Float32 value, const unsigned long pos = 0); /** set CumulativeMetersetWeight (300a,0134) * @param value value to be set (single value only) or "" for no value @@ -196,14 +182,12 @@ class DCMTK_DCMRT_EXPORT DRTBeamDoseVerificationControlPointSequence /// internal flag used to mark the empty default item /*const*/ OFBool EmptyDefaultItem; - /// AverageBeamDosePointDepth (300a,008d) vr=FL, vm=1, type=2C - DcmFloatingPointSingle AverageBeamDosePointDepth; - /// AverageBeamDosePointEquivalentDepth (300a,008e) vr=FL, vm=1, type=2C - DcmFloatingPointSingle AverageBeamDosePointEquivalentDepth; - /// AverageBeamDosePointSSD (300a,008f) vr=FL, vm=1, type=2C - DcmFloatingPointSingle AverageBeamDosePointSSD; - /// AverageBeamDosePointSourceToExternalContourDistance (300a,0131) vr=FL, vm=1, type=3 - DcmFloatingPointSingle AverageBeamDosePointSourceToExternalContourDistance; + /// BeamDosePointDepth (300a,0088) vr=FL, vm=1, type=1C + DcmFloatingPointSingle BeamDosePointDepth; + /// BeamDosePointEquivalentDepth (300a,0089) vr=FL, vm=1, type=1C + DcmFloatingPointSingle BeamDosePointEquivalentDepth; + /// BeamDosePointSSD (300a,008a) vr=FL, vm=1, type=1C + DcmFloatingPointSingle BeamDosePointSSD; /// CumulativeMetersetWeight (300a,0134) vr=DS, vm=1, type=1 DcmDecimalString CumulativeMetersetWeight; /// ReferencedControlPointIndex (300c,00f0) vr=IS, vm=1, type=1C diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h index 2359a297..6706c262 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h @@ -6,8 +6,8 @@ * * Header file for class DRTContrastBolusAdministrationRouteSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtccs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtccs.h index 91b3902e..5d145655 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtccs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtccs.h @@ -6,8 +6,8 @@ * * Header file for class DRTConceptCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h index 432bfbb2..ea695b09 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h @@ -6,8 +6,8 @@ * * Header file for class DRTConsentForClinicalTrialUseSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h index 321ac5b5..a066dd98 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTCalculatedDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtces.h b/dcmrt/include/dcmtk/dcmrt/seq/drtces.h index 4a8fa1d5..186db7b5 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtces.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtces.h @@ -6,8 +6,8 @@ * * Header file for class DRTContributingEquipmentSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h index b9906158..e19e1da4 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h @@ -6,8 +6,8 @@ * * Header file for class DRTContextGroupIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtchs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtchs.h index da30f97a..f933c1cf 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtchs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtchs.h @@ -6,8 +6,8 @@ * * Header file for class DRTChannelSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -93,6 +93,41 @@ class DCMTK_DCMRT_EXPORT DRTChannelSequence // --- get DICOM attribute values --- + /** get AfterloaderChannelID (300a,0273) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getAfterloaderChannelID(OFString &value, const signed long pos = 0) const; + + /** get ChannelEffectiveLength (300a,0271) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getChannelEffectiveLength(OFString &value, const signed long pos = 0) const; + + /** get ChannelEffectiveLength (300a,0271) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getChannelEffectiveLength(Float64 &value, const unsigned long pos = 0) const; + + /** get ChannelInnerLength (300a,0272) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getChannelInnerLength(OFString &value, const signed long pos = 0) const; + + /** get ChannelInnerLength (300a,0272) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getChannelInnerLength(Float64 &value, const unsigned long pos = 0) const; + /** get ChannelLength (300a,0284) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -289,6 +324,20 @@ class DCMTK_DCMRT_EXPORT DRTChannelSequence */ OFCondition getSourceApplicatorStepSize(Float64 &value, const unsigned long pos = 0) const; + /** get SourceApplicatorTipLength (300a,0274) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getSourceApplicatorTipLength(OFString &value, const signed long pos = 0) const; + + /** get SourceApplicatorTipLength (300a,0274) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getSourceApplicatorTipLength(Float64 &value, const unsigned long pos = 0) const; + /** get SourceApplicatorType (300a,0292) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -387,6 +436,27 @@ class DCMTK_DCMRT_EXPORT DRTChannelSequence // --- set DICOM attribute values --- + /** set AfterloaderChannelID (300a,0273) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (SH) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setAfterloaderChannelID(const OFString &value, const OFBool check = OFTrue); + + /** set ChannelEffectiveLength (300a,0271) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (DS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setChannelEffectiveLength(const OFString &value, const OFBool check = OFTrue); + + /** set ChannelInnerLength (300a,0272) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (DS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setChannelInnerLength(const OFString &value, const OFBool check = OFTrue); + /** set ChannelLength (300a,0284) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (DS) and VM (1) if enabled @@ -499,6 +569,13 @@ class DCMTK_DCMRT_EXPORT DRTChannelSequence */ OFCondition setSourceApplicatorStepSize(const OFString &value, const OFBool check = OFTrue); + /** set SourceApplicatorTipLength (300a,0274) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (DS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setSourceApplicatorTipLength(const OFString &value, const OFBool check = OFTrue); + /** set SourceApplicatorType (300a,0292) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled @@ -546,8 +623,14 @@ class DCMTK_DCMRT_EXPORT DRTChannelSequence /// internal flag used to mark the empty default item /*const*/ OFBool EmptyDefaultItem; + /// AfterloaderChannelID (300a,0273) vr=SH, vm=1, type=3 + DcmShortString AfterloaderChannelID; /// BrachyControlPointSequence (300a,02d0) vr=SQ, vm=1, type=1 DRTBrachyControlPointSequence BrachyControlPointSequence; + /// ChannelEffectiveLength (300a,0271) vr=DS, vm=1, type=3 + DcmDecimalString ChannelEffectiveLength; + /// ChannelInnerLength (300a,0272) vr=DS, vm=1, type=2C + DcmDecimalString ChannelInnerLength; /// ChannelLength (300a,0284) vr=DS, vm=1, type=2 DcmDecimalString ChannelLength; /// ChannelNumber (300a,0282) vr=IS, vm=1, type=1 @@ -582,6 +665,8 @@ class DCMTK_DCMRT_EXPORT DRTChannelSequence DcmIntegerString SourceApplicatorNumber; /// SourceApplicatorStepSize (300a,02a0) vr=DS, vm=1, type=1C DcmDecimalString SourceApplicatorStepSize; + /// SourceApplicatorTipLength (300a,0274) vr=DS, vm=1, type=2C + DcmDecimalString SourceApplicatorTipLength; /// SourceApplicatorType (300a,0292) vr=CS, vm=1, type=1C DcmCodeString SourceApplicatorType; /// SourceApplicatorWallNominalThickness (300a,029c) vr=DS, vm=1, type=3 diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcims.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcims.h index 75c15c8e..4dfacaf8 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcims.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcims.h @@ -6,8 +6,8 @@ * * Header file for class DRTContentItemModifierSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -136,6 +136,13 @@ class DCMTK_DCMRT_EXPORT DRTContentItemModifierSequence */ OFCondition getNumericValue(OFVector &value) const; + /** get ObservationDateTime (0040,a032) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getObservationDateTime(OFString &value, const signed long pos = 0) const; + /** get PersonName (0040,a123) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -265,6 +272,13 @@ class DCMTK_DCMRT_EXPORT DRTContentItemModifierSequence */ OFCondition setNumericValue(const OFString &value, const OFBool check = OFTrue); + /** set ObservationDateTime (0040,a032) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (DT) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setObservationDateTime(const OFString &value, const OFBool check = OFTrue); + /** set PersonName (0040,a123) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1) if enabled @@ -333,6 +347,8 @@ class DCMTK_DCMRT_EXPORT DRTContentItemModifierSequence DRTMeasurementUnitsCodeSequence MeasurementUnitsCodeSequence; /// NumericValue (0040,a30a) vr=DS, vm=1-n, type=1C DcmDecimalString NumericValue; + /// ObservationDateTime (0040,a032) vr=DT, vm=1, type=3 + DcmDateTime ObservationDateTime; /// PersonName (0040,a123) vr=PN, vm=1, type=1C DcmPersonName PersonName; /// RationalDenominatorValue (0040,a163) vr=UL, vm=1-n, type=1C diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcis.h index 5773afc8..46ddf78d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcis.h @@ -6,8 +6,8 @@ * * Header file for class DRTContourImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h index 009cbd4d..94c8d82d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h @@ -6,8 +6,8 @@ * * Header file for class DRTConceptNameCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcos.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcos.h index 70da3d93..73def605 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcos.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcos.h @@ -6,8 +6,8 @@ * * Header file for class DRTCompensatorSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h index 7476892b..bc5e9beb 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h @@ -6,8 +6,8 @@ * * Header file for class DRTCorrectedParameterSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h index b7e29cbf..e75b8708 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h @@ -6,8 +6,8 @@ * * Header file for class DRTConsultingPhysicianIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcps.h index b42fe86f..5834a03f 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcps.h @@ -6,8 +6,8 @@ * * Header file for class DRTControlPointSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcs.h index d9c1e2be..981c3508 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTContourSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h index 5876bd4f..b1741fb6 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h @@ -6,8 +6,8 @@ * * Header file for class DRTConversionSourceAttributesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h index 7d3f0e11..cdc6c240 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h @@ -6,8 +6,8 @@ * * Header file for class DRTChannelShieldSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h index 65183fbd..26a4715b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h @@ -6,8 +6,8 @@ * * Header file for class DRTCodingSchemeIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -19,6 +19,7 @@ #include "dcmtk/ofstd/oflist.h" // for standard list class #include "dcmtk/dcmrt/drttypes.h" // module-specific helper class +#include "dcmtk/dcmrt/seq/drtcsrs.h" // for CodingSchemeResourcesSequence /** Interface class for CodingSchemeIdentificationSequence (0008,0110) @@ -140,6 +141,20 @@ class DCMTK_DCMRT_EXPORT DRTCodingSchemeIdentificationSequence */ OFCondition getCodingSchemeVersion(OFString &value, const signed long pos = 0) const; + // --- get DICOM sequence attributes --- + + /** get CodingSchemeResourcesSequence (0008,0109) + * @return reference to sequence element + */ + DRTCodingSchemeResourcesSequence &getCodingSchemeResourcesSequence() + { return CodingSchemeResourcesSequence; } + + /** get CodingSchemeResourcesSequence (0008,0109) + * @return const reference to sequence element + */ + const DRTCodingSchemeResourcesSequence &getCodingSchemeResourcesSequence() const + { return CodingSchemeResourcesSequence; } + // --- set DICOM attribute values --- /** set CodingSchemeDesignator (0008,0102) @@ -204,6 +219,8 @@ class DCMTK_DCMRT_EXPORT DRTCodingSchemeIdentificationSequence DcmShortText CodingSchemeName; /// CodingSchemeRegistry (0008,0112) vr=LO, vm=1, type=1C DcmLongString CodingSchemeRegistry; + /// CodingSchemeResourcesSequence (0008,0109) vr=SQ, vm=1, type=3 + DRTCodingSchemeResourcesSequence CodingSchemeResourcesSequence; /// CodingSchemeResponsibleOrganization (0008,0116) vr=ST, vm=1, type=3 DcmShortText CodingSchemeResponsibleOrganization; /// CodingSchemeUID (0008,010c) vr=UI, vm=1, type=1C diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcsrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcsrs.h new file mode 100644 index 00000000..0d88215e --- /dev/null +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcsrs.h @@ -0,0 +1,320 @@ +/* + * + * Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany + * Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Header file for class DRTCodingSchemeResourcesSequence + * + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 + * + */ + + +#ifndef DRTCSRS_H +#define DRTCSRS_H + +#include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first + +#include "dcmtk/ofstd/oflist.h" // for standard list class +#include "dcmtk/dcmrt/drttypes.h" // module-specific helper class + + +/** Interface class for CodingSchemeResourcesSequence (0008,0109) + */ +class DCMTK_DCMRT_EXPORT DRTCodingSchemeResourcesSequence + : protected DRTTypes +{ + + public: + + /** Item class + */ + class DCMTK_DCMRT_EXPORT Item + : protected DRTTypes + { + + public: + + // --- constructors, destructor and operators --- + + /** (default) constructor + * @param emptyDefaultItem flag used to mark the empty default item + */ + Item(const OFBool emptyDefaultItem = OFFalse); + + /** copy constructor + * @param copy item object to be copied + */ + Item(const Item ©); + + /** destructor + */ + virtual ~Item(); + + /** assigment operator + * @param copy item object to be copied + * @return reference to this object + */ + Item &operator=(const Item ©); + + // --- general methods --- + + /** clear all internal member variables + */ + void clear(); + + /** check if item is empty + * @return OFTrue if item is empty, OFFalse otherwise + */ + OFBool isEmpty(); + + /** check if item is valid, i.e.\ not the empty default item + * @return OFTrue if item is valid, OFFalse otherwise + */ + OFBool isValid() const; + + // --- input/output methods --- + + /** read elements from sequence item + * @param item reference to DICOM sequence item from which the elements should be read + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition read(DcmItem &item); + + /** write elements to sequence item + * @param item reference to DICOM sequence item to which the elements should be written + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition write(DcmItem &item); + + // --- get DICOM attribute values --- + + /** get CodingSchemeURL (0008,010e) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getCodingSchemeURL(OFString &value, const signed long pos = 0) const; + + /** get CodingSchemeURLType (0008,010a) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getCodingSchemeURLType(OFString &value, const signed long pos = 0) const; + + // --- set DICOM attribute values --- + + /** set CodingSchemeURL (0008,010e) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (UR) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setCodingSchemeURL(const OFString &value, const OFBool check = OFTrue); + + /** set CodingSchemeURLType (0008,010a) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setCodingSchemeURLType(const OFString &value, const OFBool check = OFTrue); + + private: + + /// internal flag used to mark the empty default item + /*const*/ OFBool EmptyDefaultItem; + + /// CodingSchemeURL (0008,010e) vr=UR, vm=1, type=1 + DcmUniversalResourceIdentifierOrLocator CodingSchemeURL; + /// CodingSchemeURLType (0008,010a) vr=CS, vm=1, type=1 + DcmCodeString CodingSchemeURLType; + + }; + + // --- constructors, destructor and operators --- + + /** (default) constructor + * @param emptyDefaultSequence internal flag used to mark the empty default sequence + */ + DRTCodingSchemeResourcesSequence(const OFBool emptyDefaultSequence = OFFalse); + + /** copy constructor + * @param copy sequence object to be copied + */ + DRTCodingSchemeResourcesSequence(const DRTCodingSchemeResourcesSequence ©); + + /** destructor + */ + virtual ~DRTCodingSchemeResourcesSequence(); + + /** assigment operator + * @param copy sequence object to be copied + * @return reference to this object + */ + DRTCodingSchemeResourcesSequence &operator=(const DRTCodingSchemeResourcesSequence ©); + + // --- general methods --- + + /** clear all internal member variables + */ + void clear(); + + /** check if sequence is empty + * @return OFTrue if sequence is empty, OFFalse otherwise + */ + OFBool isEmpty(); + + /** check if sequence is valid, i.e.\ not the empty default sequence + * @return OFTrue if sequence is valid, OFFalse otherwise + */ + OFBool isValid() const; + + /** get number of items in the sequence + * @return number of items + */ + size_t getNumberOfItems() const; + + /** goto first item in the sequence + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition gotoFirstItem(); + + /** goto next item in the sequence + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition gotoNextItem(); + + /** goto particular item in the sequence + * @param num number of the item to be selected (0..num-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition gotoItem(const size_t num); + + /** get current item in the sequence + * @param item reference to item pointer (result variable) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getCurrentItem(Item *&item) const; + + /** get current item in the sequence + * @return reference to specified item if successful, empty default item otherwise + */ + Item &getCurrentItem(); + + /** get current item in the sequence + * @return const reference to specified item if successful, empty default item otherwise + */ + const Item &getCurrentItem() const; + + /** get particular item in the sequence + * @param num number of the item to be retrieved (0..num-1) + * @param item reference to item pointer (result variable) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getItem(const size_t num, Item *&item); + + /** get particular item in the sequence + * @param num number of the item to be retrieved (0..num-1) + * @return reference to specified item if successful, empty default item otherwise + */ + Item &getItem(const size_t num); + + /** get particular item in the sequence + * @param num number of the item to be retrieved (0..num-1) + * @return const reference to specified item if successful, empty default item otherwise + */ + const Item &getItem(const size_t num) const; + + /** get particular item in the sequence + * @param num number of the item to be retrieved (0..num-1) + * @return reference to specified item if successful, empty default item otherwise + */ + Item &operator[](const size_t num); + + /** get particular item in the sequence + * @param num number of the item to be retrieved (0..num-1) + * @return const reference to specified item if successful, empty default item otherwise + */ + const Item &operator[](const size_t num) const; + + /** add new item to the end of this sequence + * @param item reference to new item pointer (result variable) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addItem(Item *&item); + + /** insert new item into the sequence + * @param pos position where the new item is to be inserted (0..num) + * @param item reference to new item pointer (result variable) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition insertItem(const size_t pos, Item *&item); + + /** remove particular item from the sequence + * @param pos position of the item to be removed (0..num-1) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition removeItem(const size_t pos); + + // --- input/output methods --- + + /** read sequence of items from dataset + * @param dataset reference to DICOM dataset from which the sequence should be read + * @param card cardinality (valid range for number of items) + * @param type value type (valid value: "1", "1C", "2" or something else which is not checked) + * @param moduleName optional module/sequence name to be printed (default: "RT object" if NULL) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition read(DcmItem &dataset, + const OFString &card, + const OFString &type, + const char *moduleName = NULL); + + /** write sequence of items to dataset + * @param dataset reference to DICOM dataset to which the sequence should be written + * @param card cardinality (valid range for number of items) + * @param type value type (valid value: "1", "2" or something else which is not checked) + * @param moduleName optional module/sequence name to be printed (default: "RT object" if NULL) + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition write(DcmItem &dataset, + const OFString &card, + const OFString &type, + const char *moduleName = NULL); + + protected: + + /** goto particular item in the sequence + * @param num number of the item to be selected (0..num-1) + * @param iterator list iterator storing the position of the item + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition gotoItem(const size_t num, + OFListIterator(Item *) &iterator); + + /** goto particular item in the sequence + * @param num number of the item to be selected (0..num-1) + * @param iterator list iterator storing the position of the item + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition gotoItem(const size_t num, + OFListConstIterator(Item *) &iterator) const; + + private: + + /// internal flag used to mark the empty default sequence + /*const*/ OFBool EmptyDefaultSequence; + + /// list of items in this sequence + OFList SequenceOfItems; + /// currently selected item + OFListIterator(Item *) CurrentItem; + /// empty default item + Item EmptyItem; + +}; + + +#endif diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcss.h index 695e6e67..bbf8eeb1 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtcss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcss.h @@ -6,8 +6,8 @@ * * Header file for class DRTChannelSourceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h index ff28d21c..9373578b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTDerivationCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h index 6c48c5e9..efe60a6b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h @@ -6,8 +6,8 @@ * * Header file for class DRTDeliveredDepthDoseParametersSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtddps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtddps.h index 07cdb698..647af0b9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtddps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtddps.h @@ -6,8 +6,8 @@ * * Header file for class DRTDepthDoseParametersSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdias.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdias.h index b1a90d98..c83d4ef8 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdias.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdias.h @@ -6,8 +6,8 @@ * * Header file for class DRTDeidentificationActionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h index 5117210f..bc3a7c97 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTDeidentificationMethodCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h index 9de2e9c3..306f0bee 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTDICOMMediaRetrievalSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h index acae8652..4e53d18b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h @@ -6,8 +6,8 @@ * * Header file for class DRTDICOMRetrievalSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h index 627f2c82..154254fc 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtds.h index 657d1307..5bc24083 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtds.h @@ -6,8 +6,8 @@ * * Header file for class DRTDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h index 448522ec..f6d5464d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTDigitalSignaturePurposeCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdss.h index a5c2e099..f1603c08 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdss.h @@ -6,8 +6,8 @@ * * Header file for class DRTDigitalSignaturesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h index ff8ddded..4e09143e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h @@ -6,8 +6,8 @@ * * Header file for class DRTDVHSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h index 405ce422..8067a75e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTDVHReferencedROISequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drteas.h b/dcmrt/include/dcmtk/dcmrt/seq/drteas.h index c7535b4a..5ed36da2 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drteas.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drteas.h @@ -6,8 +6,8 @@ * * Header file for class DRTEncryptedAttributesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtecs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtecs.h index c97d6385..738d2388 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtecs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtecs.h @@ -6,8 +6,8 @@ * * Header file for class DRTEquivalentCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtes.h b/dcmrt/include/dcmtk/dcmrt/seq/drtes.h index 7a2da652..4106135e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtes.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtes.h @@ -6,8 +6,8 @@ * * Header file for class DRTExposureSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfds.h index f47ae149..dc784f79 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtfds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfds.h @@ -6,8 +6,8 @@ * * Header file for class DRTFixationDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfes.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfes.h index 4e88eea4..50f621b9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtfes.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfes.h @@ -6,8 +6,8 @@ * * Header file for class DRTFrameExtractionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h index 9359140c..f6222c81 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h @@ -6,8 +6,8 @@ * * Header file for class DRTFractionGroupSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h index a67a14ee..ba4bba43 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h @@ -6,8 +6,8 @@ * * Header file for class DRTFractionGroupSummarySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfms.h index de4520a6..6eddc48c 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtfms.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfms.h @@ -6,8 +6,8 @@ * * Header file for class DRTFluenceMapSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h index c9b05adb..8ad589f9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h @@ -6,8 +6,8 @@ * * Header file for class DRTFractionStatusSummarySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtgas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtgas.h index 0b603786..3c4e2283 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtgas.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtgas.h @@ -6,8 +6,8 @@ * * Header file for class DRTGeneralAccessorySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h index 663c85b9..dbbd7d8b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTGeneticModificationsCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtgms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtgms.h index 0657e460..4370af5c 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtgms.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtgms.h @@ -6,8 +6,8 @@ * * Header file for class DRTGeneticModificationsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h index b65e3d5f..5a0ac8da 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h @@ -6,8 +6,8 @@ * * Header file for class DRTGroupOfPatientsIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h index fd9e9494..2461260d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTHL7StructuredDocumentReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiais.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiais.h index 92b809c8..9bd7552e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtiais.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiais.h @@ -6,8 +6,8 @@ * * Header file for class DRTIssuerOfAdmissionIDSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtians.h b/dcmrt/include/dcmtk/dcmrt/seq/drtians.h index d296703d..50542d27 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtians.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtians.h @@ -6,8 +6,8 @@ * * Header file for class DRTIssuerOfAccessionNumberSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h index ee8dbe3b..acf6b159 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonBeamLimitingDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtibls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtibls.h index de3b8e13..0265c93b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtibls.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtibls.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonBlockSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtibs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtibs.h index 33eaa964..354b7448 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtibs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtibs.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonBeamSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drticpds.h b/dcmrt/include/dcmtk/dcmrt/seq/drticpds.h index 379b2a00..18034a99 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drticpds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drticpds.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonControlPointDeliverySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drticps.h b/dcmrt/include/dcmtk/dcmrt/seq/drticps.h index d912f1da..2ada246b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drticps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drticps.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonControlPointSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtics.h index f17504f4..9b6a7c75 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtics.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtics.h @@ -6,8 +6,8 @@ * * Header file for class DRTInstitutionCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiis.h index 5c53fb08..ad0f1f4e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtiis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiis.h @@ -6,8 +6,8 @@ * * Header file for class DRTIconImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h index 0cd47b51..e0532ec7 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h @@ -6,8 +6,8 @@ * * Header file for class DRTIssuerOfPatientIDQualifiersSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtircs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtircs.h index 6ed52874..1747fc47 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtircs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtircs.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonRangeCompensatorSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h index a48bb9da..f3fef499 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h @@ -6,8 +6,8 @@ * * Header file for class DRTIssuerOfServiceEpisodeIDSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtitts.h b/dcmrt/include/dcmtk/dcmrt/seq/drtitts.h index e5ba49e1..7bcc3de0 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtitts.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtitts.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonToleranceTableSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h index 99e5b423..b4b9a827 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonWedgePositionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiws.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiws.h index 8fef365c..32e5e102 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtiws.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiws.h @@ -6,8 +6,8 @@ * * Header file for class DRTIonWedgeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h index 4a13c954..50bc8b70 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h @@ -6,8 +6,8 @@ * * Header file for class DRTLateralSpreadingDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h index a48743c8..1bf36676 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h @@ -6,8 +6,8 @@ * * Header file for class DRTLateralSpreadingDeviceSettingsSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h index 7f16cd3b..19a26034 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h @@ -6,8 +6,8 @@ * * Header file for class DRTLateralSpreadingDeviceSettingsSequenceInRTIonBeamsSessionRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h index 407ca305..64d7f53c 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h @@ -6,8 +6,8 @@ * * Header file for class DRTMultiplexedAudioChannelsDescriptionCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmas.h index eed5c451..56d18e33 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtmas.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmas.h @@ -6,8 +6,8 @@ * * Header file for class DRTModifiedAttributesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h index 8e257a16..04a225b3 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTMeasuredDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmls.h index dd7c5764..a3324f7f 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtmls.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmls.h @@ -6,8 +6,8 @@ * * Header file for class DRTModalityLUTSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmps.h index 77f33ea2..9d295df2 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtmps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmps.h @@ -6,8 +6,8 @@ * * Header file for class DRTMACParametersSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmris.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmris.h index 11153ed7..4c81609c 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtmris.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmris.h @@ -6,8 +6,8 @@ * * Header file for class DRTMappingResourceIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmss.h index 9c81badd..790497c0 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtmss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmss.h @@ -6,8 +6,8 @@ * * Header file for class DRTMotionSynchronizationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h index 0854ce61..7551e33b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h @@ -6,8 +6,8 @@ * * Header file for class DRTMeasurementUnitsCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtoas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtoas.h index b1cc006c..0f404537 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtoas.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtoas.h @@ -6,8 +6,8 @@ * * Header file for class DRTOriginalAttributesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtois.h b/dcmrt/include/dcmtk/dcmrt/seq/drtois.h index 3e791695..89896311 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtois.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtois.h @@ -6,8 +6,8 @@ * * Header file for class DRTOperatorIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtopis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtopis.h index 8ff2c071..92accf44 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtopis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtopis.h @@ -6,8 +6,8 @@ * * Header file for class DRTOtherPatientIDsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtos.h b/dcmrt/include/dcmtk/dcmrt/seq/drtos.h index c0f74453..6533dbfe 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtos.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtos.h @@ -6,8 +6,8 @@ * * Header file for class DRTOverrideSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h index 9817abd6..cb440c0d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTPatientBreedCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h index 5763aef6..f0cbcc24 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTProcedureCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h index 407b7a4d..ff8e68e5 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h @@ -6,8 +6,8 @@ * * Header file for class DRTProtocolContextSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -137,6 +137,13 @@ class DCMTK_DCMRT_EXPORT DRTProtocolContextSequence */ OFCondition getNumericValue(OFVector &value) const; + /** get ObservationDateTime (0040,a032) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getObservationDateTime(OFString &value, const signed long pos = 0) const; + /** get PersonName (0040,a123) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -278,6 +285,13 @@ class DCMTK_DCMRT_EXPORT DRTProtocolContextSequence */ OFCondition setNumericValue(const OFString &value, const OFBool check = OFTrue); + /** set ObservationDateTime (0040,a032) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (DT) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setObservationDateTime(const OFString &value, const OFBool check = OFTrue); + /** set PersonName (0040,a123) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1) if enabled @@ -348,6 +362,8 @@ class DCMTK_DCMRT_EXPORT DRTProtocolContextSequence DRTMeasurementUnitsCodeSequence MeasurementUnitsCodeSequence; /// NumericValue (0040,a30a) vr=DS, vm=1-n, type=1C DcmDecimalString NumericValue; + /// ObservationDateTime (0040,a032) vr=DT, vm=1, type=3 + DcmDateTime ObservationDateTime; /// PersonName (0040,a123) vr=PN, vm=1, type=1C DcmPersonName PersonName; /// RationalDenominatorValue (0040,a163) vr=UL, vm=1-n, type=1C diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h index 1413f5b3..a79f044a 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h @@ -6,8 +6,8 @@ * * Header file for class DRTPrivateDataElementCharacteristicsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h index daa4601f..f568e993 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h @@ -6,8 +6,8 @@ * * Header file for class DRTPrivateDataElementDefinitionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h index 3e8fb443..c007a34e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h @@ -6,8 +6,8 @@ * * Header file for class DRTPrimaryFluenceModeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h index ebdd8a07..89f367f0 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h @@ -6,8 +6,8 @@ * * Header file for class DRTPersonIdentificationCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h index 16054a2f..b1b27d1a 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTPurposeOfReferenceCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtporis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtporis.h index 083fbe0f..88402ffd 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtporis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtporis.h @@ -6,8 +6,8 @@ * * Header file for class DRTPhysiciansOfRecordIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h index 77c55ed4..69a8d183 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTPerformedProtocolCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h index e3b7d710..5ea10628 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h @@ -6,8 +6,8 @@ * * Header file for class DRTPhysiciansReadingStudyIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h index 99d75c5b..92349bcf 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h @@ -6,8 +6,8 @@ * * Header file for class DRTPatientSpeciesCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h index 507ae178..c015f724 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h @@ -6,8 +6,8 @@ * * Header file for class DRTPatientSizeCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpss.h index 341f9aca..648e2690 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpss.h @@ -6,8 +6,8 @@ * * Header file for class DRTPatientSetupSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h index 6f99bce0..5285070b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h @@ -6,8 +6,8 @@ * * Header file for class DRTPredecessorStructureSetSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h index 94aa557a..c8310780 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h @@ -6,8 +6,8 @@ * * Header file for class DRTPlannedVerificationImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtqds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtqds.h index 35f65923..278f61d9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtqds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtqds.h @@ -6,8 +6,8 @@ * * Header file for class DRTQuantityDefinitionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -136,6 +136,13 @@ class DCMTK_DCMRT_EXPORT DRTQuantityDefinitionSequence */ OFCondition getNumericValue(OFVector &value) const; + /** get ObservationDateTime (0040,a032) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition getObservationDateTime(OFString &value, const signed long pos = 0) const; + /** get PersonName (0040,a123) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components @@ -265,6 +272,13 @@ class DCMTK_DCMRT_EXPORT DRTQuantityDefinitionSequence */ OFCondition setNumericValue(const OFString &value, const OFBool check = OFTrue); + /** set ObservationDateTime (0040,a032) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (DT) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setObservationDateTime(const OFString &value, const OFBool check = OFTrue); + /** set PersonName (0040,a123) * @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1) if enabled @@ -333,6 +347,8 @@ class DCMTK_DCMRT_EXPORT DRTQuantityDefinitionSequence DRTMeasurementUnitsCodeSequence MeasurementUnitsCodeSequence; /// NumericValue (0040,a30a) vr=DS, vm=1-n, type=1C DcmDecimalString NumericValue; + /// ObservationDateTime (0040,a032) vr=DT, vm=1, type=3 + DcmDateTime ObservationDateTime; /// PersonName (0040,a123) vr=PN, vm=1, type=1C DcmPersonName PersonName; /// RationalDenominatorValue (0040,a163) vr=UL, vm=1-n, type=1C diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtras.h b/dcmrt/include/dcmtk/dcmrt/seq/drtras.h index d5bbf38d..89895943 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtras.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtras.h @@ -6,8 +6,8 @@ * * Header file for class DRTRequestAttributesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h index 7297a1e0..05000d07 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedBrachyApplicationSetupSequenceInRTDoseModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h index c35a98a6..a2af4757 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedBrachyApplicationSetupSequenceInRTFractionSchemeModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h index 4a53ca47..7b0b0f75 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h @@ -6,8 +6,8 @@ * * Header file for class DRTRecordedBlockSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h index b39ca92d..cd4f68b4 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedBolusSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h index 0dd1cbe7..6e3ce9e0 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedBolusSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h index 994b658b..87c1cad1 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedBolusSequenceInRTIonBeamsSessionRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h index a159153a..d87a5ad2 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedBeamSequenceInRTDoseModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h index ad64ed61..13e18022 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedBeamSequenceInRTGeneralTreatmentRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -19,7 +19,6 @@ #include "dcmtk/ofstd/oflist.h" // for standard list class #include "dcmtk/dcmrt/drttypes.h" // module-specific helper class -#include "dcmtk/dcmrt/seq/drtbvcps.h" // for BeamDoseVerificationControlPointSequence /** Interface class for ReferencedBeamSequence (300c,0004) in RTGeneralTreatmentRecordModule @@ -189,19 +188,12 @@ class DCMTK_DCMRT_EXPORT DRTReferencedBeamSequenceInRTGeneralTreatmentRecordModu */ OFCondition getReferencedBeamNumber(Sint32 &value, const unsigned long pos = 0) const; - // --- get DICOM sequence attributes --- - - /** get BeamDoseVerificationControlPointSequence (300a,008c) - * @return reference to sequence element - */ - DRTBeamDoseVerificationControlPointSequence &getBeamDoseVerificationControlPointSequence() - { return BeamDoseVerificationControlPointSequence; } - - /** get BeamDoseVerificationControlPointSequence (300a,008c) - * @return const reference to sequence element + /** get ReferencedDoseReferenceUID (300a,0083) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise */ - const DRTBeamDoseVerificationControlPointSequence &getBeamDoseVerificationControlPointSequence() const - { return BeamDoseVerificationControlPointSequence; } + OFCondition getReferencedDoseReferenceUID(OFString &value, const signed long pos = 0) const; // --- set DICOM attribute values --- @@ -261,6 +253,13 @@ class DCMTK_DCMRT_EXPORT DRTReferencedBeamSequenceInRTGeneralTreatmentRecordModu */ OFCondition setReferencedBeamNumber(const OFString &value, const OFBool check = OFTrue); + /** set ReferencedDoseReferenceUID (300a,0083) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (UI) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setReferencedDoseReferenceUID(const OFString &value, const OFBool check = OFTrue); + private: /// internal flag used to mark the empty default item @@ -278,12 +277,12 @@ class DCMTK_DCMRT_EXPORT DRTReferencedBeamSequenceInRTGeneralTreatmentRecordModu DcmDecimalString BeamDoseSpecificationPoint; /// BeamDoseType (300a,0090) vr=CS, vm=1, type=1C DcmCodeString BeamDoseType; - /// BeamDoseVerificationControlPointSequence (300a,008c) vr=SQ, vm=1, type=3 - DRTBeamDoseVerificationControlPointSequence BeamDoseVerificationControlPointSequence; /// BeamMeterset (300a,0086) vr=DS, vm=1, type=3 DcmDecimalString BeamMeterset; /// ReferencedBeamNumber (300c,0006) vr=IS, vm=1, type=1 DcmIntegerString ReferencedBeamNumber; + /// ReferencedDoseReferenceUID (300a,0083) vr=UI, vm=1, type=3 + DcmUniqueIdentifier ReferencedDoseReferenceUID; }; diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h index a802d12f..ce4a70f9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedBeamSequenceInRTFractionSchemeModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -19,7 +19,6 @@ #include "dcmtk/ofstd/oflist.h" // for standard list class #include "dcmtk/dcmrt/drttypes.h" // module-specific helper class -#include "dcmtk/dcmrt/seq/drtbvcps.h" // for BeamDoseVerificationControlPointSequence /** Interface class for ReferencedBeamSequence (300c,0004) in RTFractionSchemeModule @@ -189,19 +188,12 @@ class DCMTK_DCMRT_EXPORT DRTReferencedBeamSequenceInRTFractionSchemeModule */ OFCondition getReferencedBeamNumber(Sint32 &value, const unsigned long pos = 0) const; - // --- get DICOM sequence attributes --- - - /** get BeamDoseVerificationControlPointSequence (300a,008c) - * @return reference to sequence element - */ - DRTBeamDoseVerificationControlPointSequence &getBeamDoseVerificationControlPointSequence() - { return BeamDoseVerificationControlPointSequence; } - - /** get BeamDoseVerificationControlPointSequence (300a,008c) - * @return const reference to sequence element + /** get ReferencedDoseReferenceUID (300a,0083) + * @param value reference to variable in which the value should be stored + * @param pos index of the value to get (0..vm-1), -1 for all components + * @return status, EC_Normal if successful, an error code otherwise */ - const DRTBeamDoseVerificationControlPointSequence &getBeamDoseVerificationControlPointSequence() const - { return BeamDoseVerificationControlPointSequence; } + OFCondition getReferencedDoseReferenceUID(OFString &value, const signed long pos = 0) const; // --- set DICOM attribute values --- @@ -261,6 +253,13 @@ class DCMTK_DCMRT_EXPORT DRTReferencedBeamSequenceInRTFractionSchemeModule */ OFCondition setReferencedBeamNumber(const OFString &value, const OFBool check = OFTrue); + /** set ReferencedDoseReferenceUID (300a,0083) + * @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (UI) and VM (1) if enabled + * @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setReferencedDoseReferenceUID(const OFString &value, const OFBool check = OFTrue); + private: /// internal flag used to mark the empty default item @@ -278,12 +277,12 @@ class DCMTK_DCMRT_EXPORT DRTReferencedBeamSequenceInRTFractionSchemeModule DcmDecimalString BeamDoseSpecificationPoint; /// BeamDoseType (300a,0090) vr=CS, vm=1, type=1C DcmCodeString BeamDoseType; - /// BeamDoseVerificationControlPointSequence (300a,008c) vr=SQ, vm=1, type=3 - DRTBeamDoseVerificationControlPointSequence BeamDoseVerificationControlPointSequence; /// BeamMeterset (300a,0086) vr=DS, vm=1, type=3 DcmDecimalString BeamMeterset; /// ReferencedBeamNumber (300c,0006) vr=IS, vm=1, type=1 DcmIntegerString ReferencedBeamNumber; + /// ReferencedDoseReferenceUID (300a,0083) vr=UI, vm=1, type=3 + DcmUniqueIdentifier ReferencedDoseReferenceUID; }; diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h index 09afccd8..195e2c4b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedCalculatedDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h index c974a8ff..be0b04cd 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h @@ -6,8 +6,8 @@ * * Header file for class DRTRecordedCompensatorSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h index 7d7bc067..c24a6886 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedControlPointSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h index 3d215c45..26268348 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTROIContourSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h index 98654cd1..7abb2a71 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h @@ -6,8 +6,8 @@ * * Header file for class DRTRTDoseROISequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h index 1647e0fd..0fe6ef6b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedDoseReferenceSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -19,6 +19,7 @@ #include "dcmtk/ofstd/oflist.h" // for standard list class #include "dcmtk/dcmrt/drttypes.h" // module-specific helper class +#include "dcmtk/dcmrt/seq/drtbvcps.h" // for BeamDoseVerificationControlPointSequence /** Interface class for ReferencedDoseReferenceSequence (300c,0050) in RTBeamsModule @@ -91,19 +92,12 @@ class DCMTK_DCMRT_EXPORT DRTReferencedDoseReferenceSequenceInRTBeamsModule // --- get DICOM attribute values --- - /** get CumulativeDoseReferenceCoefficient (300a,010c) + /** get DepthValueAveragingFlag (300a,0093) * @param value reference to variable in which the value should be stored * @param pos index of the value to get (0..vm-1), -1 for all components * @return status, EC_Normal if successful, an error code otherwise */ - OFCondition getCumulativeDoseReferenceCoefficient(OFString &value, const signed long pos = 0) const; - - /** get CumulativeDoseReferenceCoefficient (300a,010c) - * @param value reference to variable in which the value should be stored - * @param pos index of the value to get (0..vm-1) - * @return status, EC_Normal if successful, an error code otherwise - */ - OFCondition getCumulativeDoseReferenceCoefficient(Float64 &value, const unsigned long pos = 0) const; + OFCondition getDepthValueAveragingFlag(OFString &value, const signed long pos = 0) const; /** get ReferencedDoseReferenceNumber (300c,0051) * @param value reference to variable in which the value should be stored @@ -119,14 +113,28 @@ class DCMTK_DCMRT_EXPORT DRTReferencedDoseReferenceSequenceInRTBeamsModule */ OFCondition getReferencedDoseReferenceNumber(Sint32 &value, const unsigned long pos = 0) const; + // --- get DICOM sequence attributes --- + + /** get BeamDoseVerificationControlPointSequence (300a,008c) + * @return reference to sequence element + */ + DRTBeamDoseVerificationControlPointSequence &getBeamDoseVerificationControlPointSequence() + { return BeamDoseVerificationControlPointSequence; } + + /** get BeamDoseVerificationControlPointSequence (300a,008c) + * @return const reference to sequence element + */ + const DRTBeamDoseVerificationControlPointSequence &getBeamDoseVerificationControlPointSequence() const + { return BeamDoseVerificationControlPointSequence; } + // --- set DICOM attribute values --- - /** set CumulativeDoseReferenceCoefficient (300a,010c) + /** set DepthValueAveragingFlag (300a,0093) * @param value value to be set (single value only) or "" for no value - * @param check check 'value' for conformance with VR (DS) and VM (1) if enabled + * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled * @return status, EC_Normal if successful, an error code otherwise */ - OFCondition setCumulativeDoseReferenceCoefficient(const OFString &value, const OFBool check = OFTrue); + OFCondition setDepthValueAveragingFlag(const OFString &value, const OFBool check = OFTrue); /** set ReferencedDoseReferenceNumber (300c,0051) * @param value value to be set (single value only) or "" for no value @@ -140,8 +148,10 @@ class DCMTK_DCMRT_EXPORT DRTReferencedDoseReferenceSequenceInRTBeamsModule /// internal flag used to mark the empty default item /*const*/ OFBool EmptyDefaultItem; - /// CumulativeDoseReferenceCoefficient (300a,010c) vr=DS, vm=1, type=2 - DcmDecimalString CumulativeDoseReferenceCoefficient; + /// BeamDoseVerificationControlPointSequence (300a,008c) vr=SQ, vm=1, type=1 + DRTBeamDoseVerificationControlPointSequence BeamDoseVerificationControlPointSequence; + /// DepthValueAveragingFlag (300a,0093) vr=CS, vm=1, type=1C + DcmCodeString DepthValueAveragingFlag; /// ReferencedDoseReferenceNumber (300c,0051) vr=IS, vm=1, type=1 DcmIntegerString ReferencedDoseReferenceNumber; diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h index 113ca63a..2a14c31f 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedDoseReferenceSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h index a8ede3ce..3969ea0a 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedDoseReferenceSequenceInRTFractionSchemeModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrds.h index e6195635..02914750 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrds.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedDoseSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h index 387aa4fa..9620921d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h @@ -6,8 +6,8 @@ * * Header file for class DRTROIElementalCompositionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h index f4c07396..137b97e9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedFractionGroupSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h index f61f6590..dada3622 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedFrameOfReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrics.h index 0c15cbb6..74458f92 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrics.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrics.h @@ -6,8 +6,8 @@ * * Header file for class DRTRTROIIdentificationCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrims.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrims.h index 77d21790..7adb2cba 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrims.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrims.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtris.h b/dcmrt/include/dcmtk/dcmrt/seq/drtris.h index 9d28f48c..294ea21a 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtris.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtris.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedInstanceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h index a44350de..8bfc69af 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h @@ -6,8 +6,8 @@ * * Header file for class DRTRecordedLateralSpreadingDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h index cb614eb9..526dfaae 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedMeasuredDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrms.h index 9a314fa8..c7de22db 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrms.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrms.h @@ -6,8 +6,8 @@ * * Header file for class DRTRangeModulatorSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h index eb8d9928..d04f8de7 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h @@ -6,8 +6,8 @@ * * Header file for class DRTRangeModulatorSettingsSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h index a62e63eb..537cb165 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h @@ -6,8 +6,8 @@ * * Header file for class DRTRangeModulatorSettingsSequenceInRTIonBeamsSessionRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h index f80fb25c..52480db9 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTRequestedProcedureCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h index 593e2f28..513a8aac 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferringPhysicianIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h index b5b98769..854836b0 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTReasonForPerformedProcedureCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h index d9f205e1..86c81324 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedPatientPhotoSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h index 002c6191..8a60cb56 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h @@ -6,8 +6,8 @@ * * Header file for class DRTROIPhysicalPropertiesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h index ba9ae3a7..4b14db0b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedPerformedProcedureStepSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrps.h index 4fc01679..6cef4157 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrps.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedPatientSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h index 15b48bc5..20e83985 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedReferenceImageSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h index 5ebaa962..e6995740 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedReferenceImageSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h index 8e2aee1f..9aef152c 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h index 84a97d2c..b0c19f08 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h @@ -6,8 +6,8 @@ * * Header file for class DRTRecordedRangeModulatorSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrros.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrros.h index 272d3c41..6bfda7e7 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrros.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrros.h @@ -6,8 +6,8 @@ * * Header file for class DRTRTROIObservationsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h index 612bf5d5..bb5647fb 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTReasonForRequestedProcedureCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h index 895ba6b9..a8bbc1bf 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h @@ -6,8 +6,8 @@ * * Header file for class DRTRelatedRTROIObservationsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h index dc0cfe0f..c152f4ef 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTRTRelatedROISequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h index 841a01ca..337c9e58 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h @@ -6,8 +6,8 @@ * * Header file for class DRTRecordedRangeShifterSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h index b263d26a..7c76d9a3 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedRTPlanSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h index e56ea2e3..0af292de 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedRTPlanSequenceInRTGeneralPlanModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h index 37952221..5f0c7b89 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedRTPlanSequenceInRTGeneralTreatmentRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h index 35a12d2e..49836e0f 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedRTPlanSequenceInRTImageModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h index a69becea..b62f9c5c 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h @@ -6,8 +6,8 @@ * * Header file for class DRTRequestingServiceCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h index fe21f183..ddc5aa00 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedSeriesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrses.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrses.h index 9171f91b..22442301 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrses.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrses.h @@ -6,8 +6,8 @@ * * Header file for class DRTRTReferencedSeriesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h index 6ed2d258..440461a4 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h @@ -6,8 +6,8 @@ * * Header file for class DRTRangeShifterSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h index def130d3..53eaa3ef 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h @@ -6,8 +6,8 @@ * * Header file for class DRTRangeShifterSettingsSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h index afbaaefe..1be837eb 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h @@ -6,8 +6,8 @@ * * Header file for class DRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h index f43ed0b0..5b9defb2 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedSetupImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h index 0ac5ec47..63bb3c4d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h @@ -6,8 +6,8 @@ * * Header file for class DRTRecordedSnoutSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h index 968b10ed..c8242639 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedSOPSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h index 6799eb1a..fa499a0e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedSpatialRegistrationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrss.h index de7708f7..582f0247 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrss.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedStudySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h index 11ee42f6..d8720c78 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedStructureSetSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h index 134913ec..330fc6b8 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h @@ -6,8 +6,8 @@ * * Header file for class DRTRTReferencedStudySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h index df48681e..1b3115e2 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedTreatmentRecordSequenceInRTDoseModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h index 0bf315e9..57592c39 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedTreatmentRecordSequenceInRTGeneralTreatmentRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h index bcc59a14..fb1f3f57 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h @@ -6,8 +6,8 @@ * * Header file for class DRTReferencedVerificationImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrws.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrws.h index d7af877e..14a21d61 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrws.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrws.h @@ -6,8 +6,8 @@ * * Header file for class DRTRecordedWedgeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h index c6a900cc..2c834d2e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h @@ -6,8 +6,8 @@ * * Header file for class DRTRealWorldValueMappingSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtscris.h b/dcmrt/include/dcmtk/dcmrt/seq/drtscris.h index da3c551d..7cbc312d 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtscris.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtscris.h @@ -6,8 +6,8 @@ * * Header file for class DRTStudiesContainingOtherReferencedInstancesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtscs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtscs.h index c4f50df5..fe46392b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtscs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtscs.h @@ -6,8 +6,8 @@ * * Header file for class DRTStrainCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h index 793e35a5..342ea593 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTSeriesDescriptionCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsds.h index 61f17eba..869a261f 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtsds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsds.h @@ -6,8 +6,8 @@ * * Header file for class DRTSetupDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtshds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtshds.h index 8b87da34..1fbe4346 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtshds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtshds.h @@ -6,8 +6,8 @@ * * Header file for class DRTShieldingDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsins.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsins.h index d3f5a572..a66e0ece 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtsins.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsins.h @@ -6,8 +6,8 @@ * * Header file for class DRTSourceInstanceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsis.h index a1b206a8..eeab9418 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtsis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsis.h @@ -6,8 +6,8 @@ * * Header file for class DRTSourceImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsns.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsns.h index 65e74c87..44f58dae 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtsns.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsns.h @@ -6,8 +6,8 @@ * * Header file for class DRTSnoutSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h index 43dcf858..ab4de945 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h @@ -6,8 +6,8 @@ * * Header file for class DRTSegmentedPropertyCategoryCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h index 9a49cf2c..b5454be3 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTScheduledProtocolCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h index 5093486c..3e53786e 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h @@ -6,8 +6,8 @@ * * Header file for class DRTSourcePatientGroupIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h index 4883ffa8..eb696a13 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTSegmentedPropertyTypeModifierCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtss.h index 8c250f75..af8abe4a 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtss.h @@ -6,8 +6,8 @@ * * Header file for class DRTSourceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h index f74c1d21..e05d9728 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h @@ -6,8 +6,8 @@ * * Header file for class DRTStrainSourceRegistryCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h index b14783d0..ddc3c5bb 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTStructureSetROISequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h index 504d771b..3bfc4aa5 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h @@ -6,8 +6,8 @@ * * Header file for class DRTStrainStockSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttms0.h b/dcmrt/include/dcmtk/dcmrt/seq/drttms0.h index 8ef7c0ac..3931d37f 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drttms0.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drttms0.h @@ -6,8 +6,8 @@ * * Header file for class DRTTreatmentMachineSequenceInRTTreatmentMachineRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttms9.h b/dcmrt/include/dcmtk/dcmrt/seq/drttms9.h index 69df49d2..41a76062 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drttms9.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drttms9.h @@ -6,8 +6,8 @@ * * Header file for class DRTTreatmentMachineSequenceInRTBrachyApplicationSetupsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttscds.h b/dcmrt/include/dcmtk/dcmrt/seq/drttscds.h index a0d6ef90..6684d28b 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drttscds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drttscds.h @@ -6,8 +6,8 @@ * * Header file for class DRTTreatmentSummaryCalculatedDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h b/dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h index 999d2e32..7ba86b29 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h @@ -6,8 +6,8 @@ * * Header file for class DRTTreatmentSessionIonBeamSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h b/dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h index d7e21cf5..dea494f8 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h @@ -6,8 +6,8 @@ * * Header file for class DRTTreatmentSummaryMeasuredDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttts.h b/dcmrt/include/dcmtk/dcmrt/seq/drttts.h index 24ae0d17..d61bff5a 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drttts.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drttts.h @@ -6,8 +6,8 @@ * * Header file for class DRTToleranceTableSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtudis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtudis.h index bb8c07bc..8f67e76f 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtudis.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtudis.h @@ -6,8 +6,8 @@ * * Header file for class DRTUDISequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtvls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtvls.h index d5564786..b7b881e7 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtvls.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtvls.h @@ -6,8 +6,8 @@ * * Header file for class DRTVOILUTSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtwps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtwps.h index fc0d7c54..f689d221 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtwps.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtwps.h @@ -6,8 +6,8 @@ * * Header file for class DRTWedgePositionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h index da8d3c43..4d10c6cf 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTWADORetrievalSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h index b3d3b54c..cb7dd5e6 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTWADORSRetrievalSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtws.h b/dcmrt/include/dcmtk/dcmrt/seq/drtws.h index 15b80c57..5012b262 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtws.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtws.h @@ -6,8 +6,8 @@ * * Header file for class DRTWedgeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h index 1c0e9e32..eb996ffd 100644 --- a/dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h +++ b/dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h @@ -6,8 +6,8 @@ * * Header file for class DRTXDSRetrievalSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/CMakeLists.txt b/dcmrt/libsrc/CMakeLists.txt index 93f5c8d7..b1147766 100644 --- a/dcmrt/libsrc/CMakeLists.txt +++ b/dcmrt/libsrc/CMakeLists.txt @@ -1,4 +1,4 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmrt drtdose drtimage drtplan drtstrct drttreat drtionpl drtiontr drmdose drmimage drmplan drmstrct drttypes drtaadcs drtadcs drtads drtafs drtags drtajcs drtas1 drtas5 drtas6 drtas7 drtass drtbads drtbas drtbcps drtbl2 drtbl5 drtbldls drtbldps drtblds1 drtblds5 drtblds6 drtbldts drtbrcss drtbrdrs drtbrs drtbs drtbss drtbvcps drtcbars drtccs drtcctus drtcdrs drtces drtcgis drtchs drtcims drtcis drtcncs drtcos drtcpas drtcpis drtcps drtcsas drtcs drtcshs drtcsis drtcss drtdcs drtdddps drtddps drtdias drtdimcs drtdimrs drtdirs drtdrs drtds drtdspcs drtdss drtdvhs drtdvrrs drteas drtecs drtes drtfds drtfes drtfgs drtfgss drtfms drtfsss drtgas drtgmcs drtgms drtgpis drthsdrs drtiais drtians drtiblds drtibls drtibs drticpds drticps drtics drtiis drtipiqs drtircs drtiseis drtitts drtiwps drtiws drtlsds6 drtlsds7 drtlsds drtmacds drtmas drtmdrs drtmls drtmps drtmris drtmss drtmucs drtoas drtois drtopis drtos drtpbcs drtpcs drtpcxs drtpdecs drtpdeds drtpfms drtpics drtporcs drtporis drtppcs drtprsis drtpscs drtpsics drtpss drtpsss drtpvis drtqds drtras drtrbas2 drtrbas8 drtrbls drtrbos1 drtrbos6 drtrbos7 drtrbs2 drtrbs4 drtrbs8 drtrcdrs drtrcos drtrcps drtrcs drtrdros drtrdrs1 drtrdrs6 drtrdrs8 drtrds drtrecs drtrfgs drtrfors drtrics drtrims drtris drtrlsds drtrmdrs drtrms drtrmss6 drtrmss7 drtrpcs drtrpis drtrppcs drtrpphs drtrpps drtrppss drtrps drtrris1 drtrris6 drtrris9 drtrrms drtrros drtrrpcs drtrrros drtrrs drtrrshs drtrrtps3 drtrrtps4 drtrrtps5 drtrrtps drtrscs drtrsers drtrses drtrshs6 drtrshs7 drtrshs drtrsis drtrsns drtrsos drtrsrs drtrss drtrsss drtrsts drtrtrs2 drtrtrs4 drtrvis drtwrsrs drtrws drtrwvms drtscris drtscs drtsdcs drtsds drtshds drtsins drtsis drtsns drtspccs drtspcs drtspgis drtsptcs drtss drtssrcs drtssrs drtsss drttms0 drttms9 drttscds drttsibs drttsmds drttts drtudis drtvls drtwps drtwrs drtws drtxrs) +DCMTK_ADD_LIBRARY(dcmrt drtdose drtimage drtplan drtstrct drttreat drtionpl drtiontr drmdose drmimage drmplan drmstrct drttypes drtaadcs drtadcs drtads drtafs drtags drtajcs drtas1 drtas5 drtas6 drtas7 drtass drtbads drtbas drtbcps drtbl2 drtbl5 drtbldls drtbldps drtblds1 drtblds5 drtblds6 drtbldts drtbrcss drtbrdrs drtbrs drtbs drtbss drtbvcps drtcbars drtccs drtcctus drtcdrs drtces drtcgis drtchs drtcims drtcis drtcncs drtcos drtcpas drtcpis drtcps drtcsas drtcs drtcshs drtcsis drtcsrs drtcss drtdcs drtdddps drtddps drtdias drtdimcs drtdimrs drtdirs drtdrs drtds drtdspcs drtdss drtdvhs drtdvrrs drteas drtecs drtes drtfds drtfes drtfgs drtfgss drtfms drtfsss drtgas drtgmcs drtgms drtgpis drthsdrs drtiais drtians drtiblds drtibls drtibs drticpds drticps drtics drtiis drtipiqs drtircs drtiseis drtitts drtiwps drtiws drtlsds6 drtlsds7 drtlsds drtmacds drtmas drtmdrs drtmls drtmps drtmris drtmss drtmucs drtoas drtois drtopis drtos drtpbcs drtpcs drtpcxs drtpdecs drtpdeds drtpfms drtpics drtporcs drtporis drtppcs drtprsis drtpscs drtpsics drtpss drtpsss drtpvis drtqds drtras drtrbas2 drtrbas8 drtrbls drtrbos1 drtrbos6 drtrbos7 drtrbs2 drtrbs4 drtrbs8 drtrcdrs drtrcos drtrcps drtrcs drtrdros drtrdrs1 drtrdrs6 drtrdrs8 drtrds drtrecs drtrfgs drtrfors drtrics drtrims drtris drtrlsds drtrmdrs drtrms drtrmss6 drtrmss7 drtrpcs drtrpis drtrppcs drtrpphs drtrpps drtrppss drtrps drtrris1 drtrris6 drtrris9 drtrrms drtrros drtrrpcs drtrrros drtrrs drtrrshs drtrrtps3 drtrrtps4 drtrrtps5 drtrrtps drtrscs drtrsers drtrses drtrshs6 drtrshs7 drtrshs drtrsis drtrsns drtrsos drtrsrs drtrss drtrsss drtrsts drtrtrs2 drtrtrs4 drtrvis drtwrsrs drtrws drtrwvms drtscris drtscs drtsdcs drtsds drtshds drtsins drtsis drtsns drtspccs drtspcs drtspgis drtsptcs drtss drtssrcs drtssrs drtsss drttms0 drttms9 drttscds drttsibs drttsmds drttts drtudis drtvls drtwps drtwrs drtws drtxrs) DCMTK_TARGET_LINK_MODULES(dcmrt ofstd oflog dcmdata dcmimgle) diff --git a/dcmrt/libsrc/Makefile.dep b/dcmrt/libsrc/Makefile.dep index 3164bd61..3a55c7a1 100644 --- a/dcmrt/libsrc/Makefile.dep +++ b/dcmrt/libsrc/Makefile.dep @@ -118,6 +118,7 @@ drmdose.o: drmdose.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -316,6 +317,7 @@ drmimage.o: drmimage.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -535,6 +537,7 @@ drmplan.o: drmplan.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtcps.h \ ../include/dcmtk/dcmrt/seq/drtbldps.h \ ../include/dcmtk/dcmrt/seq/drtrdrs1.h \ + ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrds.h ../include/dcmtk/dcmrt/seq/drtwps.h \ ../include/dcmtk/dcmrt/seq/drtgas.h ../include/dcmtk/dcmrt/seq/drtpvis.h \ ../include/dcmtk/dcmrt/seq/drtpfms.h \ @@ -543,6 +546,7 @@ drmplan.o: drmplan.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -555,7 +559,6 @@ drmplan.o: drmplan.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtdspcs.h \ ../include/dcmtk/dcmrt/seq/drtdrs.h ../include/dcmtk/dcmrt/seq/drteas.h \ ../include/dcmtk/dcmrt/seq/drtfgs.h ../include/dcmtk/dcmrt/seq/drtrbs8.h \ - ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrbas8.h \ ../include/dcmtk/dcmrt/seq/drtrdrs8.h \ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \ @@ -735,6 +738,7 @@ drmstrct.o: drmstrct.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -3848,6 +3852,7 @@ drtbs.o: drtbs.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtcps.h \ ../include/dcmtk/dcmrt/seq/drtbldps.h \ ../include/dcmtk/dcmrt/seq/drtrdrs1.h \ + ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrds.h ../include/dcmtk/dcmrt/seq/drtwps.h \ ../include/dcmtk/dcmrt/seq/drtgas.h ../include/dcmtk/dcmrt/seq/drtpvis.h \ ../include/dcmtk/dcmrt/seq/drtpfms.h \ @@ -5726,9 +5731,10 @@ drtcps.o: drtcps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmrt/seq/drtbldps.h \ ../include/dcmtk/dcmrt/seq/drtrdrs1.h \ + ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrds.h ../include/dcmtk/dcmrt/seq/drtwps.h -drtcs.o: drtcs.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtcs.h \ +drtcsas.o: drtcsas.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtcsas.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -5842,10 +5848,9 @@ drtcs.o: drtcs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ - ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ - ../include/dcmtk/dcmrt/seq/drtcis.h -drtcsas.o: drtcsas.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtcsas.h \ + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h +drtcs.o: drtcs.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtcs.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -5959,7 +5964,8 @@ drtcsas.o: drtcsas.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ - ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ + ../include/dcmtk/dcmrt/seq/drtcis.h drtcshs.o: drtcshs.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtcshs.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -6191,6 +6197,123 @@ drtcsis.o: drtcsis.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h +drtcsrs.o: drtcsrs.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../include/dcmtk/dcmrt/drttypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \ + ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ + ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpixseq.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvruc.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrut.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpixel.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrpobw.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcovlay.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrat.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrss.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h drtcss.o: drtcss.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtcss.h \ @@ -7242,6 +7365,7 @@ drtdose.o: drtdose.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -8721,7 +8845,6 @@ drtfgs.o: drtfgs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmrt/seq/drtrbs8.h \ - ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrbas8.h \ ../include/dcmtk/dcmrt/seq/drtrdrs8.h \ ../include/dcmtk/dcmrt/seq/drtrds.h @@ -10857,6 +10980,7 @@ drtimage.o: drtimage.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -11050,6 +11174,7 @@ drtionpl.o: drtionpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -11062,7 +11187,6 @@ drtionpl.o: drtionpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtdspcs.h \ ../include/dcmtk/dcmrt/seq/drtdrs.h ../include/dcmtk/dcmrt/seq/drteas.h \ ../include/dcmtk/dcmrt/seq/drtfgs.h ../include/dcmtk/dcmrt/seq/drtrbs8.h \ - ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrbas8.h \ ../include/dcmtk/dcmrt/seq/drtrdrs8.h \ ../include/dcmtk/dcmrt/seq/drtrds.h ../include/dcmtk/dcmrt/seq/drtgms.h \ @@ -11258,6 +11382,7 @@ drtiontr.o: drtiontr.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcdrs.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -12050,8 +12175,8 @@ drtiws.o: drtiws.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -drtlsds.o: drtlsds.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtlsds.h \ +drtlsds6.o: drtlsds6.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtlsds6.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -12166,8 +12291,8 @@ drtlsds.o: drtlsds.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -drtlsds6.o: drtlsds6.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtlsds6.h \ +drtlsds7.o: drtlsds7.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtlsds7.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -12282,8 +12407,8 @@ drtlsds6.o: drtlsds6.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -drtlsds7.o: drtlsds7.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtlsds7.h \ +drtlsds.o: drtlsds.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtlsds.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -14750,6 +14875,7 @@ drtplan.o: drtplan.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtcps.h \ ../include/dcmtk/dcmrt/seq/drtbldps.h \ ../include/dcmtk/dcmrt/seq/drtrdrs1.h \ + ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrds.h ../include/dcmtk/dcmrt/seq/drtwps.h \ ../include/dcmtk/dcmrt/seq/drtgas.h ../include/dcmtk/dcmrt/seq/drtpvis.h \ ../include/dcmtk/dcmrt/seq/drtpfms.h \ @@ -14758,6 +14884,7 @@ drtplan.o: drtplan.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -14770,7 +14897,6 @@ drtplan.o: drtplan.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtdspcs.h \ ../include/dcmtk/dcmrt/seq/drtdrs.h ../include/dcmtk/dcmrt/seq/drteas.h \ ../include/dcmtk/dcmrt/seq/drtfgs.h ../include/dcmtk/dcmrt/seq/drtrbs8.h \ - ../include/dcmtk/dcmrt/seq/drtbvcps.h \ ../include/dcmtk/dcmrt/seq/drtrbas8.h \ ../include/dcmtk/dcmrt/seq/drtrdrs8.h \ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \ @@ -17063,8 +17189,7 @@ drtrbs4.o: drtrbs4.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ - ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ - ../include/dcmtk/dcmrt/seq/drtbvcps.h + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h drtrbs8.o: drtrbs8.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtrbs8.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -17180,8 +17305,7 @@ drtrbs8.o: drtrbs8.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ - ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ - ../include/dcmtk/dcmrt/seq/drtbvcps.h + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h drtrcdrs.o: drtrcdrs.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtrcdrs.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -17878,7 +18002,8 @@ drtrdrs1.o: drtrdrs1.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ - ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ + ../include/dcmtk/dcmrt/seq/drtbvcps.h drtrdrs6.o: drtrdrs6.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtrdrs6.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -21388,8 +21513,8 @@ drtrrshs.o: drtrrshs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -drtrrtps.o: drtrrtps.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtrrtps.h \ +drtrrtps3.o: drtrrtps3.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtrrtps3.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -21503,13 +21628,9 @@ drtrrtps.o: drtrrtps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ - ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ - ../include/dcmtk/dcmrt/seq/drtrfgs.h \ - ../include/dcmtk/dcmrt/seq/drtrbs2.h \ - ../include/dcmtk/dcmrt/seq/drtrcps.h \ - ../include/dcmtk/dcmrt/seq/drtrbas2.h -drtrrtps3.o: drtrrtps3.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtrrtps3.h \ + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h +drtrrtps4.o: drtrrtps4.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtrrtps4.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -21624,8 +21745,8 @@ drtrrtps3.o: drtrrtps3.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -drtrrtps4.o: drtrrtps4.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtrrtps4.h \ +drtrrtps5.o: drtrrtps5.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtrrtps5.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -21740,8 +21861,8 @@ drtrrtps4.o: drtrrtps4.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -drtrrtps5.o: drtrrtps5.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtrrtps5.h \ +drtrrtps.o: drtrrtps.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtrrtps.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -21855,7 +21976,11 @@ drtrrtps5.o: drtrrtps5.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ - ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ + ../include/dcmtk/dcmrt/seq/drtrfgs.h \ + ../include/dcmtk/dcmrt/seq/drtrbs2.h \ + ../include/dcmtk/dcmrt/seq/drtrcps.h \ + ../include/dcmtk/dcmrt/seq/drtrbas2.h drtrscs.o: drtrscs.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtrscs.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -22209,8 +22334,8 @@ drtrses.o: drtrses.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmrt/seq/drtcis.h -drtrshs.o: drtrshs.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtrshs.h \ +drtrshs6.o: drtrshs6.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtrshs6.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -22325,8 +22450,8 @@ drtrshs.o: drtrshs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -drtrshs6.o: drtrshs6.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtrshs6.h \ +drtrshs7.o: drtrshs7.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtrshs7.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -22441,8 +22566,8 @@ drtrshs6.o: drtrshs6.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h -drtrshs7.o: drtrshs7.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmrt/seq/drtrshs7.h \ +drtrshs.o: drtrshs.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmrt/seq/drtrshs.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -25956,6 +26081,7 @@ drtstrct.o: drtstrct.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ @@ -26382,6 +26508,7 @@ drttreat.o: drttreat.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmrt/seq/drtbrs.h \ ../include/dcmtk/dcmrt/seq/drtbrcss.h \ ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ ../include/dcmtk/dcmrt/seq/drtcctus.h \ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ ../include/dcmtk/dcmrt/seq/drtpics.h \ diff --git a/dcmrt/libsrc/Makefile.in b/dcmrt/libsrc/Makefile.in index 1268ef71..51c46437 100644 --- a/dcmrt/libsrc/Makefile.in +++ b/dcmrt/libsrc/Makefile.in @@ -29,10 +29,10 @@ objs = drtdose.o drtimage.o drtplan.o drtstrct.o drttreat.o drtionpl.o drtiontr. drtbldts.o drtbrcss.o drtbrdrs.o drtbrs.o drtbs.o drtbss.o drtbvcps.o \ drtcbars.o drtccs.o drtcctus.o drtcdrs.o drtces.o drtcgis.o drtchs.o \ drtcims.o drtcis.o drtcncs.o drtcos.o drtcpas.o drtcpis.o drtcps.o \ - drtcsas.o drtcs.o drtcshs.o drtcsis.o drtcss.o drtdcs.o drtdddps.o \ - drtddps.o drtdias.o drtdimcs.o drtdimrs.o drtdirs.o drtdrs.o drtds.o \ - drtdspcs.o drtdss.o drtdvhs.o drtdvrrs.o drteas.o drtecs.o drtes.o \ - drtfds.o drtfes.o drtfgs.o drtfgss.o drtfms.o drtfsss.o drtgas.o \ + drtcsas.o drtcs.o drtcshs.o drtcsis.o drtcsrs.o drtcss.o drtdcs.o \ + drtdddps.o drtddps.o drtdias.o drtdimcs.o drtdimrs.o drtdirs.o drtdrs.o \ + drtds.o drtdspcs.o drtdss.o drtdvhs.o drtdvrrs.o drteas.o drtecs.o \ + drtes.o drtfds.o drtfes.o drtfgs.o drtfgss.o drtfms.o drtfsss.o drtgas.o \ drtgmcs.o drtgms.o drtgpis.o drthsdrs.o drtiais.o drtians.o drtiblds.o \ drtibls.o drtibs.o drticpds.o drticps.o drtics.o drtiis.o drtipiqs.o \ drtircs.o drtiseis.o drtitts.o drtiwps.o drtiws.o drtlsds6.o drtlsds7.o \ diff --git a/dcmrt/libsrc/drtaadcs.cc b/dcmrt/libsrc/drtaadcs.cc index 16684b66..32e4644e 100644 --- a/dcmrt/libsrc/drtaadcs.cc +++ b/dcmrt/libsrc/drtaadcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTAssigningAgencyOrDepartmentCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtadcs.cc b/dcmrt/libsrc/drtadcs.cc index 51c68a04..aa9012ce 100644 --- a/dcmrt/libsrc/drtadcs.cc +++ b/dcmrt/libsrc/drtadcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTAdmittingDiagnosesCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtads.cc b/dcmrt/libsrc/drtads.cc index 68b183cb..99775e6e 100644 --- a/dcmrt/libsrc/drtads.cc +++ b/dcmrt/libsrc/drtads.cc @@ -6,8 +6,8 @@ * * Source file for class DRTAdditionalDrugSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtafs.cc b/dcmrt/libsrc/drtafs.cc index be70b9f8..8c6fb5d8 100644 --- a/dcmrt/libsrc/drtafs.cc +++ b/dcmrt/libsrc/drtafs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTAssigningFacilitySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtags.cc b/dcmrt/libsrc/drtags.cc index 19a01f79..c6285b2b 100644 --- a/dcmrt/libsrc/drtags.cc +++ b/dcmrt/libsrc/drtags.cc @@ -6,8 +6,8 @@ * * Source file for class DRTApplicatorGeometrySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtajcs.cc b/dcmrt/libsrc/drtajcs.cc index 920763d8..ed6c27d8 100644 --- a/dcmrt/libsrc/drtajcs.cc +++ b/dcmrt/libsrc/drtajcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTAssigningJurisdictionCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtas1.cc b/dcmrt/libsrc/drtas1.cc index a6ed0c50..ff3ac9b9 100644 --- a/dcmrt/libsrc/drtas1.cc +++ b/dcmrt/libsrc/drtas1.cc @@ -6,8 +6,8 @@ * * Source file for class DRTApplicatorSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtas5.cc b/dcmrt/libsrc/drtas5.cc index 9033eabf..d5f33fe9 100644 --- a/dcmrt/libsrc/drtas5.cc +++ b/dcmrt/libsrc/drtas5.cc @@ -6,8 +6,8 @@ * * Source file for class DRTApplicatorSequenceInRTImageModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtas6.cc b/dcmrt/libsrc/drtas6.cc index 6eac70bc..b33f4893 100644 --- a/dcmrt/libsrc/drtas6.cc +++ b/dcmrt/libsrc/drtas6.cc @@ -6,8 +6,8 @@ * * Source file for class DRTApplicatorSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtas7.cc b/dcmrt/libsrc/drtas7.cc index 492b968e..2922045a 100644 --- a/dcmrt/libsrc/drtas7.cc +++ b/dcmrt/libsrc/drtas7.cc @@ -6,8 +6,8 @@ * * Source file for class DRTApplicatorSequenceInRTIonBeamsSessionRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtass.cc b/dcmrt/libsrc/drtass.cc index 2e65a963..d0e96329 100644 --- a/dcmrt/libsrc/drtass.cc +++ b/dcmrt/libsrc/drtass.cc @@ -6,8 +6,8 @@ * * Source file for class DRTApplicationSetupSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbads.cc b/dcmrt/libsrc/drtbads.cc index 22cc9c35..60470eaa 100644 --- a/dcmrt/libsrc/drtbads.cc +++ b/dcmrt/libsrc/drtbads.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBrachyAccessoryDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbas.cc b/dcmrt/libsrc/drtbas.cc index b0d6eef6..22863ad7 100644 --- a/dcmrt/libsrc/drtbas.cc +++ b/dcmrt/libsrc/drtbas.cc @@ -6,8 +6,8 @@ * * Source file for class DRTContrastBolusAgentSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbcps.cc b/dcmrt/libsrc/drtbcps.cc index 5f4eb8f0..a3540204 100644 --- a/dcmrt/libsrc/drtbcps.cc +++ b/dcmrt/libsrc/drtbcps.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBrachyControlPointSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbl2.cc b/dcmrt/libsrc/drtbl2.cc index ef603bd2..37548f82 100644 --- a/dcmrt/libsrc/drtbl2.cc +++ b/dcmrt/libsrc/drtbl2.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBlockSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbl5.cc b/dcmrt/libsrc/drtbl5.cc index 7c3bd78b..18fa5c34 100644 --- a/dcmrt/libsrc/drtbl5.cc +++ b/dcmrt/libsrc/drtbl5.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBlockSequenceInRTImageModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbldls.cc b/dcmrt/libsrc/drtbldls.cc index 3225854e..dae74eaa 100644 --- a/dcmrt/libsrc/drtbldls.cc +++ b/dcmrt/libsrc/drtbldls.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBeamLimitingDeviceLeafPairsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbldps.cc b/dcmrt/libsrc/drtbldps.cc index 19f41a36..5f6f8d53 100644 --- a/dcmrt/libsrc/drtbldps.cc +++ b/dcmrt/libsrc/drtbldps.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBeamLimitingDevicePositionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtblds1.cc b/dcmrt/libsrc/drtblds1.cc index 4a0eccec..7b94c34a 100644 --- a/dcmrt/libsrc/drtblds1.cc +++ b/dcmrt/libsrc/drtblds1.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBeamLimitingDeviceSequenceInRTBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtblds5.cc b/dcmrt/libsrc/drtblds5.cc index 31bb6846..73f4ed00 100644 --- a/dcmrt/libsrc/drtblds5.cc +++ b/dcmrt/libsrc/drtblds5.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBeamLimitingDeviceSequenceInRTImageModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtblds6.cc b/dcmrt/libsrc/drtblds6.cc index 12a375f1..6eab998f 100644 --- a/dcmrt/libsrc/drtblds6.cc +++ b/dcmrt/libsrc/drtblds6.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBeamLimitingDeviceSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbldts.cc b/dcmrt/libsrc/drtbldts.cc index 44103943..766b92bd 100644 --- a/dcmrt/libsrc/drtbldts.cc +++ b/dcmrt/libsrc/drtbldts.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBeamLimitingDeviceToleranceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbrcss.cc b/dcmrt/libsrc/drtbrcss.cc index a52a4aa3..88856f97 100644 --- a/dcmrt/libsrc/drtbrcss.cc +++ b/dcmrt/libsrc/drtbrcss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBreedRegistryCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbrdrs.cc b/dcmrt/libsrc/drtbrdrs.cc index c252cd4c..3c4882c6 100644 --- a/dcmrt/libsrc/drtbrdrs.cc +++ b/dcmrt/libsrc/drtbrdrs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBrachyReferencedDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbrs.cc b/dcmrt/libsrc/drtbrs.cc index d4b2a2ba..c4e0e0a6 100644 --- a/dcmrt/libsrc/drtbrs.cc +++ b/dcmrt/libsrc/drtbrs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBreedRegistrationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbs.cc b/dcmrt/libsrc/drtbs.cc index 9d3a040c..fbbdeb7f 100644 --- a/dcmrt/libsrc/drtbs.cc +++ b/dcmrt/libsrc/drtbs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBeamSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -49,6 +49,7 @@ DRTBeamSequence::Item::Item(const OFBool emptyDefaultItem) PrimaryFluenceModeSequence(emptyDefaultItem /*emptyDefaultSequence*/), RadiationType(DCM_RadiationType), ReferencedBolusSequence(emptyDefaultItem /*emptyDefaultSequence*/), + ReferencedDoseReferenceSequence(emptyDefaultItem /*emptyDefaultSequence*/), ReferencedDoseSequence(emptyDefaultItem /*emptyDefaultSequence*/), ReferencedPatientSetupNumber(DCM_ReferencedPatientSetupNumber), ReferencedReferenceImageSequence(emptyDefaultItem /*emptyDefaultSequence*/), @@ -93,6 +94,7 @@ DRTBeamSequence::Item::Item(const Item ©) PrimaryFluenceModeSequence(copy.PrimaryFluenceModeSequence), RadiationType(copy.RadiationType), ReferencedBolusSequence(copy.ReferencedBolusSequence), + ReferencedDoseReferenceSequence(copy.ReferencedDoseReferenceSequence), ReferencedDoseSequence(copy.ReferencedDoseSequence), ReferencedPatientSetupNumber(copy.ReferencedPatientSetupNumber), ReferencedReferenceImageSequence(copy.ReferencedReferenceImageSequence), @@ -145,6 +147,7 @@ DRTBeamSequence::Item &DRTBeamSequence::Item::operator=(const Item ©) PrimaryFluenceModeSequence = copy.PrimaryFluenceModeSequence; RadiationType = copy.RadiationType; ReferencedBolusSequence = copy.ReferencedBolusSequence; + ReferencedDoseReferenceSequence = copy.ReferencedDoseReferenceSequence; ReferencedDoseSequence = copy.ReferencedDoseSequence; ReferencedPatientSetupNumber = copy.ReferencedPatientSetupNumber; ReferencedReferenceImageSequence = copy.ReferencedReferenceImageSequence; @@ -200,6 +203,7 @@ void DRTBeamSequence::Item::clear() BlockSequence.clear(); ApplicatorSequence.clear(); GeneralAccessorySequence.clear(); + ReferencedDoseReferenceSequence.clear(); FinalCumulativeMetersetWeight.clear(); NumberOfControlPoints.clear(); ControlPointSequence.clear(); @@ -244,6 +248,7 @@ OFBool DRTBeamSequence::Item::isEmpty() BlockSequence.isEmpty() && ApplicatorSequence.isEmpty() && GeneralAccessorySequence.isEmpty() && + ReferencedDoseReferenceSequence.isEmpty() && FinalCumulativeMetersetWeight.isEmpty() && NumberOfControlPoints.isEmpty() && ControlPointSequence.isEmpty(); @@ -298,6 +303,7 @@ OFCondition DRTBeamSequence::Item::read(DcmItem &item) BlockSequence.read(item, "1-n", "1C", "BeamSequence"); ApplicatorSequence.read(item, "1-n", "3", "BeamSequence"); GeneralAccessorySequence.read(item, "1-n", "3", "BeamSequence"); + ReferencedDoseReferenceSequence.read(item, "1-n", "3", "BeamSequence"); getAndCheckElementFromDataset(item, FinalCumulativeMetersetWeight, "1", "1C", "BeamSequence"); getAndCheckElementFromDataset(item, NumberOfControlPoints, "1", "1", "BeamSequence"); ControlPointSequence.read(item, "1-n", "1", "BeamSequence"); @@ -348,6 +354,7 @@ OFCondition DRTBeamSequence::Item::write(DcmItem &item) if (result.good()) result = BlockSequence.write(item, "1-n", "1C", "BeamSequence"); if (result.good()) result = ApplicatorSequence.write(item, "1-n", "3", "BeamSequence"); if (result.good()) result = GeneralAccessorySequence.write(item, "1-n", "3", "BeamSequence"); + if (result.good()) result = ReferencedDoseReferenceSequence.write(item, "1-n", "3", "BeamSequence"); addElementToDataset(result, item, new DcmDecimalString(FinalCumulativeMetersetWeight), "1", "1C", "BeamSequence"); addElementToDataset(result, item, new DcmIntegerString(NumberOfControlPoints), "1", "1", "BeamSequence"); if (result.good()) result = ControlPointSequence.write(item, "1-n", "1", "BeamSequence"); diff --git a/dcmrt/libsrc/drtbss.cc b/dcmrt/libsrc/drtbss.cc index 8cc439ed..935c88b5 100644 --- a/dcmrt/libsrc/drtbss.cc +++ b/dcmrt/libsrc/drtbss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBlockSlabSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtbvcps.cc b/dcmrt/libsrc/drtbvcps.cc index 2b66d222..1a5281f2 100644 --- a/dcmrt/libsrc/drtbvcps.cc +++ b/dcmrt/libsrc/drtbvcps.cc @@ -6,8 +6,8 @@ * * Source file for class DRTBeamDoseVerificationControlPointSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -21,10 +21,9 @@ DRTBeamDoseVerificationControlPointSequence::Item::Item(const OFBool emptyDefaultItem) : EmptyDefaultItem(emptyDefaultItem), - AverageBeamDosePointDepth(DCM_AverageBeamDosePointDepth), - AverageBeamDosePointEquivalentDepth(DCM_AverageBeamDosePointEquivalentDepth), - AverageBeamDosePointSSD(DCM_AverageBeamDosePointSSD), - AverageBeamDosePointSourceToExternalContourDistance(DCM_AverageBeamDosePointSourceToExternalContourDistance), + BeamDosePointDepth(DCM_BeamDosePointDepth), + BeamDosePointEquivalentDepth(DCM_BeamDosePointEquivalentDepth), + BeamDosePointSSD(DCM_BeamDosePointSSD), CumulativeMetersetWeight(DCM_CumulativeMetersetWeight), ReferencedControlPointIndex(DCM_ReferencedControlPointIndex) { @@ -33,10 +32,9 @@ DRTBeamDoseVerificationControlPointSequence::Item::Item(const OFBool emptyDefaul DRTBeamDoseVerificationControlPointSequence::Item::Item(const Item ©) : EmptyDefaultItem(copy.EmptyDefaultItem), - AverageBeamDosePointDepth(copy.AverageBeamDosePointDepth), - AverageBeamDosePointEquivalentDepth(copy.AverageBeamDosePointEquivalentDepth), - AverageBeamDosePointSSD(copy.AverageBeamDosePointSSD), - AverageBeamDosePointSourceToExternalContourDistance(copy.AverageBeamDosePointSourceToExternalContourDistance), + BeamDosePointDepth(copy.BeamDosePointDepth), + BeamDosePointEquivalentDepth(copy.BeamDosePointEquivalentDepth), + BeamDosePointSSD(copy.BeamDosePointSSD), CumulativeMetersetWeight(copy.CumulativeMetersetWeight), ReferencedControlPointIndex(copy.ReferencedControlPointIndex) { @@ -53,10 +51,9 @@ DRTBeamDoseVerificationControlPointSequence::Item &DRTBeamDoseVerificationContro if (this != ©) { EmptyDefaultItem = copy.EmptyDefaultItem; - AverageBeamDosePointDepth = copy.AverageBeamDosePointDepth; - AverageBeamDosePointEquivalentDepth = copy.AverageBeamDosePointEquivalentDepth; - AverageBeamDosePointSSD = copy.AverageBeamDosePointSSD; - AverageBeamDosePointSourceToExternalContourDistance = copy.AverageBeamDosePointSourceToExternalContourDistance; + BeamDosePointDepth = copy.BeamDosePointDepth; + BeamDosePointEquivalentDepth = copy.BeamDosePointEquivalentDepth; + BeamDosePointSSD = copy.BeamDosePointSSD; CumulativeMetersetWeight = copy.CumulativeMetersetWeight; ReferencedControlPointIndex = copy.ReferencedControlPointIndex; } @@ -71,10 +68,9 @@ void DRTBeamDoseVerificationControlPointSequence::Item::clear() /* clear all DICOM attributes */ CumulativeMetersetWeight.clear(); ReferencedControlPointIndex.clear(); - AverageBeamDosePointDepth.clear(); - AverageBeamDosePointEquivalentDepth.clear(); - AverageBeamDosePointSSD.clear(); - AverageBeamDosePointSourceToExternalContourDistance.clear(); + BeamDosePointDepth.clear(); + BeamDosePointEquivalentDepth.clear(); + BeamDosePointSSD.clear(); } } @@ -83,10 +79,9 @@ OFBool DRTBeamDoseVerificationControlPointSequence::Item::isEmpty() { return CumulativeMetersetWeight.isEmpty() && ReferencedControlPointIndex.isEmpty() && - AverageBeamDosePointDepth.isEmpty() && - AverageBeamDosePointEquivalentDepth.isEmpty() && - AverageBeamDosePointSSD.isEmpty() && - AverageBeamDosePointSourceToExternalContourDistance.isEmpty(); + BeamDosePointDepth.isEmpty() && + BeamDosePointEquivalentDepth.isEmpty() && + BeamDosePointSSD.isEmpty(); } @@ -105,10 +100,9 @@ OFCondition DRTBeamDoseVerificationControlPointSequence::Item::read(DcmItem &ite clear(); getAndCheckElementFromDataset(item, CumulativeMetersetWeight, "1", "1", "BeamDoseVerificationControlPointSequence"); getAndCheckElementFromDataset(item, ReferencedControlPointIndex, "1", "1C", "BeamDoseVerificationControlPointSequence"); - getAndCheckElementFromDataset(item, AverageBeamDosePointDepth, "1", "2C", "BeamDoseVerificationControlPointSequence"); - getAndCheckElementFromDataset(item, AverageBeamDosePointEquivalentDepth, "1", "2C", "BeamDoseVerificationControlPointSequence"); - getAndCheckElementFromDataset(item, AverageBeamDosePointSSD, "1", "2C", "BeamDoseVerificationControlPointSequence"); - getAndCheckElementFromDataset(item, AverageBeamDosePointSourceToExternalContourDistance, "1", "3", "BeamDoseVerificationControlPointSequence"); + getAndCheckElementFromDataset(item, BeamDosePointDepth, "1", "1C", "BeamDoseVerificationControlPointSequence"); + getAndCheckElementFromDataset(item, BeamDosePointEquivalentDepth, "1", "1C", "BeamDoseVerificationControlPointSequence"); + getAndCheckElementFromDataset(item, BeamDosePointSSD, "1", "1C", "BeamDoseVerificationControlPointSequence"); result = EC_Normal; } return result; @@ -123,48 +117,38 @@ OFCondition DRTBeamDoseVerificationControlPointSequence::Item::write(DcmItem &it result = EC_Normal; addElementToDataset(result, item, new DcmDecimalString(CumulativeMetersetWeight), "1", "1", "BeamDoseVerificationControlPointSequence"); addElementToDataset(result, item, new DcmIntegerString(ReferencedControlPointIndex), "1", "1C", "BeamDoseVerificationControlPointSequence"); - addElementToDataset(result, item, new DcmFloatingPointSingle(AverageBeamDosePointDepth), "1", "2C", "BeamDoseVerificationControlPointSequence"); - addElementToDataset(result, item, new DcmFloatingPointSingle(AverageBeamDosePointEquivalentDepth), "1", "2C", "BeamDoseVerificationControlPointSequence"); - addElementToDataset(result, item, new DcmFloatingPointSingle(AverageBeamDosePointSSD), "1", "2C", "BeamDoseVerificationControlPointSequence"); - addElementToDataset(result, item, new DcmFloatingPointSingle(AverageBeamDosePointSourceToExternalContourDistance), "1", "3", "BeamDoseVerificationControlPointSequence"); + addElementToDataset(result, item, new DcmFloatingPointSingle(BeamDosePointDepth), "1", "1C", "BeamDoseVerificationControlPointSequence"); + addElementToDataset(result, item, new DcmFloatingPointSingle(BeamDosePointEquivalentDepth), "1", "1C", "BeamDoseVerificationControlPointSequence"); + addElementToDataset(result, item, new DcmFloatingPointSingle(BeamDosePointSSD), "1", "1C", "BeamDoseVerificationControlPointSequence"); } return result; } -OFCondition DRTBeamDoseVerificationControlPointSequence::Item::getAverageBeamDosePointDepth(Float32 &value, const unsigned long pos) const +OFCondition DRTBeamDoseVerificationControlPointSequence::Item::getBeamDosePointDepth(Float32 &value, const unsigned long pos) const { if (EmptyDefaultItem) return EC_IllegalCall; else - return OFconst_cast(DcmFloatingPointSingle &, AverageBeamDosePointDepth).getFloat32(value, pos); + return OFconst_cast(DcmFloatingPointSingle &, BeamDosePointDepth).getFloat32(value, pos); } -OFCondition DRTBeamDoseVerificationControlPointSequence::Item::getAverageBeamDosePointEquivalentDepth(Float32 &value, const unsigned long pos) const +OFCondition DRTBeamDoseVerificationControlPointSequence::Item::getBeamDosePointEquivalentDepth(Float32 &value, const unsigned long pos) const { if (EmptyDefaultItem) return EC_IllegalCall; else - return OFconst_cast(DcmFloatingPointSingle &, AverageBeamDosePointEquivalentDepth).getFloat32(value, pos); + return OFconst_cast(DcmFloatingPointSingle &, BeamDosePointEquivalentDepth).getFloat32(value, pos); } -OFCondition DRTBeamDoseVerificationControlPointSequence::Item::getAverageBeamDosePointSSD(Float32 &value, const unsigned long pos) const +OFCondition DRTBeamDoseVerificationControlPointSequence::Item::getBeamDosePointSSD(Float32 &value, const unsigned long pos) const { if (EmptyDefaultItem) return EC_IllegalCall; else - return OFconst_cast(DcmFloatingPointSingle &, AverageBeamDosePointSSD).getFloat32(value, pos); -} - - -OFCondition DRTBeamDoseVerificationControlPointSequence::Item::getAverageBeamDosePointSourceToExternalContourDistance(Float32 &value, const unsigned long pos) const -{ - if (EmptyDefaultItem) - return EC_IllegalCall; - else - return OFconst_cast(DcmFloatingPointSingle &, AverageBeamDosePointSourceToExternalContourDistance).getFloat32(value, pos); + return OFconst_cast(DcmFloatingPointSingle &, BeamDosePointSSD).getFloat32(value, pos); } @@ -204,39 +188,30 @@ OFCondition DRTBeamDoseVerificationControlPointSequence::Item::getReferencedCont } -OFCondition DRTBeamDoseVerificationControlPointSequence::Item::setAverageBeamDosePointDepth(const Float32 value, const unsigned long pos) -{ - if (EmptyDefaultItem) - return EC_IllegalCall; - else - return AverageBeamDosePointDepth.putFloat32(value, pos); -} - - -OFCondition DRTBeamDoseVerificationControlPointSequence::Item::setAverageBeamDosePointEquivalentDepth(const Float32 value, const unsigned long pos) +OFCondition DRTBeamDoseVerificationControlPointSequence::Item::setBeamDosePointDepth(const Float32 value, const unsigned long pos) { if (EmptyDefaultItem) return EC_IllegalCall; else - return AverageBeamDosePointEquivalentDepth.putFloat32(value, pos); + return BeamDosePointDepth.putFloat32(value, pos); } -OFCondition DRTBeamDoseVerificationControlPointSequence::Item::setAverageBeamDosePointSSD(const Float32 value, const unsigned long pos) +OFCondition DRTBeamDoseVerificationControlPointSequence::Item::setBeamDosePointEquivalentDepth(const Float32 value, const unsigned long pos) { if (EmptyDefaultItem) return EC_IllegalCall; else - return AverageBeamDosePointSSD.putFloat32(value, pos); + return BeamDosePointEquivalentDepth.putFloat32(value, pos); } -OFCondition DRTBeamDoseVerificationControlPointSequence::Item::setAverageBeamDosePointSourceToExternalContourDistance(const Float32 value, const unsigned long pos) +OFCondition DRTBeamDoseVerificationControlPointSequence::Item::setBeamDosePointSSD(const Float32 value, const unsigned long pos) { if (EmptyDefaultItem) return EC_IllegalCall; else - return AverageBeamDosePointSourceToExternalContourDistance.putFloat32(value, pos); + return BeamDosePointSSD.putFloat32(value, pos); } diff --git a/dcmrt/libsrc/drtcbars.cc b/dcmrt/libsrc/drtcbars.cc index 6167fb1d..bf3f4b9c 100644 --- a/dcmrt/libsrc/drtcbars.cc +++ b/dcmrt/libsrc/drtcbars.cc @@ -6,8 +6,8 @@ * * Source file for class DRTContrastBolusAdministrationRouteSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtccs.cc b/dcmrt/libsrc/drtccs.cc index f39d5538..a5bd570f 100644 --- a/dcmrt/libsrc/drtccs.cc +++ b/dcmrt/libsrc/drtccs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTConceptCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtcctus.cc b/dcmrt/libsrc/drtcctus.cc index a18f1bf4..5d631bd1 100644 --- a/dcmrt/libsrc/drtcctus.cc +++ b/dcmrt/libsrc/drtcctus.cc @@ -6,8 +6,8 @@ * * Source file for class DRTConsentForClinicalTrialUseSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtcdrs.cc b/dcmrt/libsrc/drtcdrs.cc index 10348caf..16a47a53 100644 --- a/dcmrt/libsrc/drtcdrs.cc +++ b/dcmrt/libsrc/drtcdrs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTCalculatedDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtces.cc b/dcmrt/libsrc/drtces.cc index ac1cbb6f..35b976d0 100644 --- a/dcmrt/libsrc/drtces.cc +++ b/dcmrt/libsrc/drtces.cc @@ -6,8 +6,8 @@ * * Source file for class DRTContributingEquipmentSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtcgis.cc b/dcmrt/libsrc/drtcgis.cc index 9d0f53be..74c6749e 100644 --- a/dcmrt/libsrc/drtcgis.cc +++ b/dcmrt/libsrc/drtcgis.cc @@ -6,8 +6,8 @@ * * Source file for class DRTContextGroupIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtchs.cc b/dcmrt/libsrc/drtchs.cc index 43a1be01..004ae081 100644 --- a/dcmrt/libsrc/drtchs.cc +++ b/dcmrt/libsrc/drtchs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTChannelSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -21,7 +21,10 @@ DRTChannelSequence::Item::Item(const OFBool emptyDefaultItem) : EmptyDefaultItem(emptyDefaultItem), + AfterloaderChannelID(DCM_AfterloaderChannelID), BrachyControlPointSequence(emptyDefaultItem /*emptyDefaultSequence*/), + ChannelEffectiveLength(DCM_ChannelEffectiveLength), + ChannelInnerLength(DCM_ChannelInnerLength), ChannelLength(DCM_ChannelLength), ChannelNumber(DCM_ChannelNumber), ChannelShieldSequence(emptyDefaultItem /*emptyDefaultSequence*/), @@ -39,6 +42,7 @@ DRTChannelSequence::Item::Item(const OFBool emptyDefaultItem) SourceApplicatorName(DCM_SourceApplicatorName), SourceApplicatorNumber(DCM_SourceApplicatorNumber), SourceApplicatorStepSize(DCM_SourceApplicatorStepSize), + SourceApplicatorTipLength(DCM_SourceApplicatorTipLength), SourceApplicatorType(DCM_SourceApplicatorType), SourceApplicatorWallNominalThickness(DCM_SourceApplicatorWallNominalThickness), SourceApplicatorWallNominalTransmission(DCM_SourceApplicatorWallNominalTransmission), @@ -51,7 +55,10 @@ DRTChannelSequence::Item::Item(const OFBool emptyDefaultItem) DRTChannelSequence::Item::Item(const Item ©) : EmptyDefaultItem(copy.EmptyDefaultItem), + AfterloaderChannelID(copy.AfterloaderChannelID), BrachyControlPointSequence(copy.BrachyControlPointSequence), + ChannelEffectiveLength(copy.ChannelEffectiveLength), + ChannelInnerLength(copy.ChannelInnerLength), ChannelLength(copy.ChannelLength), ChannelNumber(copy.ChannelNumber), ChannelShieldSequence(copy.ChannelShieldSequence), @@ -69,6 +76,7 @@ DRTChannelSequence::Item::Item(const Item ©) SourceApplicatorName(copy.SourceApplicatorName), SourceApplicatorNumber(copy.SourceApplicatorNumber), SourceApplicatorStepSize(copy.SourceApplicatorStepSize), + SourceApplicatorTipLength(copy.SourceApplicatorTipLength), SourceApplicatorType(copy.SourceApplicatorType), SourceApplicatorWallNominalThickness(copy.SourceApplicatorWallNominalThickness), SourceApplicatorWallNominalTransmission(copy.SourceApplicatorWallNominalTransmission), @@ -89,7 +97,10 @@ DRTChannelSequence::Item &DRTChannelSequence::Item::operator=(const Item ©) if (this != ©) { EmptyDefaultItem = copy.EmptyDefaultItem; + AfterloaderChannelID = copy.AfterloaderChannelID; BrachyControlPointSequence = copy.BrachyControlPointSequence; + ChannelEffectiveLength = copy.ChannelEffectiveLength; + ChannelInnerLength = copy.ChannelInnerLength; ChannelLength = copy.ChannelLength; ChannelNumber = copy.ChannelNumber; ChannelShieldSequence = copy.ChannelShieldSequence; @@ -107,6 +118,7 @@ DRTChannelSequence::Item &DRTChannelSequence::Item::operator=(const Item ©) SourceApplicatorName = copy.SourceApplicatorName; SourceApplicatorNumber = copy.SourceApplicatorNumber; SourceApplicatorStepSize = copy.SourceApplicatorStepSize; + SourceApplicatorTipLength = copy.SourceApplicatorTipLength; SourceApplicatorType = copy.SourceApplicatorType; SourceApplicatorWallNominalThickness = copy.SourceApplicatorWallNominalThickness; SourceApplicatorWallNominalTransmission = copy.SourceApplicatorWallNominalTransmission; @@ -134,6 +146,7 @@ void DRTChannelSequence::Item::clear() SourceApplicatorType.clear(); SourceApplicatorName.clear(); SourceApplicatorLength.clear(); + SourceApplicatorTipLength.clear(); SourceApplicatorManufacturer.clear(); MaterialID.clear(); SourceApplicatorWallNominalThickness.clear(); @@ -142,6 +155,9 @@ void DRTChannelSequence::Item::clear() ReferencedROINumber.clear(); TransferTubeNumber.clear(); TransferTubeLength.clear(); + ChannelEffectiveLength.clear(); + ChannelInnerLength.clear(); + AfterloaderChannelID.clear(); ChannelShieldSequence.clear(); ReferencedSourceNumber.clear(); NumberOfControlPoints.clear(); @@ -164,6 +180,7 @@ OFBool DRTChannelSequence::Item::isEmpty() SourceApplicatorType.isEmpty() && SourceApplicatorName.isEmpty() && SourceApplicatorLength.isEmpty() && + SourceApplicatorTipLength.isEmpty() && SourceApplicatorManufacturer.isEmpty() && MaterialID.isEmpty() && SourceApplicatorWallNominalThickness.isEmpty() && @@ -172,6 +189,9 @@ OFBool DRTChannelSequence::Item::isEmpty() ReferencedROINumber.isEmpty() && TransferTubeNumber.isEmpty() && TransferTubeLength.isEmpty() && + ChannelEffectiveLength.isEmpty() && + ChannelInnerLength.isEmpty() && + AfterloaderChannelID.isEmpty() && ChannelShieldSequence.isEmpty() && ReferencedSourceNumber.isEmpty() && NumberOfControlPoints.isEmpty() && @@ -204,6 +224,7 @@ OFCondition DRTChannelSequence::Item::read(DcmItem &item) getAndCheckElementFromDataset(item, SourceApplicatorType, "1", "1C", "ChannelSequence"); getAndCheckElementFromDataset(item, SourceApplicatorName, "1", "3", "ChannelSequence"); getAndCheckElementFromDataset(item, SourceApplicatorLength, "1", "1C", "ChannelSequence"); + getAndCheckElementFromDataset(item, SourceApplicatorTipLength, "1", "2C", "ChannelSequence"); getAndCheckElementFromDataset(item, SourceApplicatorManufacturer, "1", "3", "ChannelSequence"); getAndCheckElementFromDataset(item, MaterialID, "1", "3", "ChannelSequence"); getAndCheckElementFromDataset(item, SourceApplicatorWallNominalThickness, "1", "3", "ChannelSequence"); @@ -212,6 +233,9 @@ OFCondition DRTChannelSequence::Item::read(DcmItem &item) getAndCheckElementFromDataset(item, ReferencedROINumber, "1", "2C", "ChannelSequence"); getAndCheckElementFromDataset(item, TransferTubeNumber, "1", "2", "ChannelSequence"); getAndCheckElementFromDataset(item, TransferTubeLength, "1", "2C", "ChannelSequence"); + getAndCheckElementFromDataset(item, ChannelEffectiveLength, "1", "3", "ChannelSequence"); + getAndCheckElementFromDataset(item, ChannelInnerLength, "1", "2C", "ChannelSequence"); + getAndCheckElementFromDataset(item, AfterloaderChannelID, "1", "3", "ChannelSequence"); ChannelShieldSequence.read(item, "1-n", "3", "ChannelSequence"); getAndCheckElementFromDataset(item, ReferencedSourceNumber, "1", "1", "ChannelSequence"); getAndCheckElementFromDataset(item, NumberOfControlPoints, "1", "1", "ChannelSequence"); @@ -240,6 +264,7 @@ OFCondition DRTChannelSequence::Item::write(DcmItem &item) addElementToDataset(result, item, new DcmCodeString(SourceApplicatorType), "1", "1C", "ChannelSequence"); addElementToDataset(result, item, new DcmLongString(SourceApplicatorName), "1", "3", "ChannelSequence"); addElementToDataset(result, item, new DcmDecimalString(SourceApplicatorLength), "1", "1C", "ChannelSequence"); + addElementToDataset(result, item, new DcmDecimalString(SourceApplicatorTipLength), "1", "2C", "ChannelSequence"); addElementToDataset(result, item, new DcmLongString(SourceApplicatorManufacturer), "1", "3", "ChannelSequence"); addElementToDataset(result, item, new DcmShortString(MaterialID), "1", "3", "ChannelSequence"); addElementToDataset(result, item, new DcmDecimalString(SourceApplicatorWallNominalThickness), "1", "3", "ChannelSequence"); @@ -248,6 +273,9 @@ OFCondition DRTChannelSequence::Item::write(DcmItem &item) addElementToDataset(result, item, new DcmIntegerString(ReferencedROINumber), "1", "2C", "ChannelSequence"); addElementToDataset(result, item, new DcmIntegerString(TransferTubeNumber), "1", "2", "ChannelSequence"); addElementToDataset(result, item, new DcmDecimalString(TransferTubeLength), "1", "2C", "ChannelSequence"); + addElementToDataset(result, item, new DcmDecimalString(ChannelEffectiveLength), "1", "3", "ChannelSequence"); + addElementToDataset(result, item, new DcmDecimalString(ChannelInnerLength), "1", "2C", "ChannelSequence"); + addElementToDataset(result, item, new DcmShortString(AfterloaderChannelID), "1", "3", "ChannelSequence"); if (result.good()) result = ChannelShieldSequence.write(item, "1-n", "3", "ChannelSequence"); addElementToDataset(result, item, new DcmIntegerString(ReferencedSourceNumber), "1", "1", "ChannelSequence"); addElementToDataset(result, item, new DcmIntegerString(NumberOfControlPoints), "1", "1", "ChannelSequence"); @@ -258,6 +286,51 @@ OFCondition DRTChannelSequence::Item::write(DcmItem &item) } +OFCondition DRTChannelSequence::Item::getAfterloaderChannelID(OFString &value, const signed long pos) const +{ + if (EmptyDefaultItem) + return EC_IllegalCall; + else + return getStringValueFromElement(AfterloaderChannelID, value, pos); +} + + +OFCondition DRTChannelSequence::Item::getChannelEffectiveLength(OFString &value, const signed long pos) const +{ + if (EmptyDefaultItem) + return EC_IllegalCall; + else + return getStringValueFromElement(ChannelEffectiveLength, value, pos); +} + + +OFCondition DRTChannelSequence::Item::getChannelEffectiveLength(Float64 &value, const unsigned long pos) const +{ + if (EmptyDefaultItem) + return EC_IllegalCall; + else + return OFconst_cast(DcmDecimalString &, ChannelEffectiveLength).getFloat64(value, pos); +} + + +OFCondition DRTChannelSequence::Item::getChannelInnerLength(OFString &value, const signed long pos) const +{ + if (EmptyDefaultItem) + return EC_IllegalCall; + else + return getStringValueFromElement(ChannelInnerLength, value, pos); +} + + +OFCondition DRTChannelSequence::Item::getChannelInnerLength(Float64 &value, const unsigned long pos) const +{ + if (EmptyDefaultItem) + return EC_IllegalCall; + else + return OFconst_cast(DcmDecimalString &, ChannelInnerLength).getFloat64(value, pos); +} + + OFCondition DRTChannelSequence::Item::getChannelLength(OFString &value, const signed long pos) const { if (EmptyDefaultItem) @@ -510,6 +583,24 @@ OFCondition DRTChannelSequence::Item::getSourceApplicatorStepSize(Float64 &value } +OFCondition DRTChannelSequence::Item::getSourceApplicatorTipLength(OFString &value, const signed long pos) const +{ + if (EmptyDefaultItem) + return EC_IllegalCall; + else + return getStringValueFromElement(SourceApplicatorTipLength, value, pos); +} + + +OFCondition DRTChannelSequence::Item::getSourceApplicatorTipLength(Float64 &value, const unsigned long pos) const +{ + if (EmptyDefaultItem) + return EC_IllegalCall; + else + return OFconst_cast(DcmDecimalString &, SourceApplicatorTipLength).getFloat64(value, pos); +} + + OFCondition DRTChannelSequence::Item::getSourceApplicatorType(OFString &value, const signed long pos) const { if (EmptyDefaultItem) @@ -600,6 +691,45 @@ OFCondition DRTChannelSequence::Item::getTransferTubeNumber(Sint32 &value, const } +OFCondition DRTChannelSequence::Item::setAfterloaderChannelID(const OFString &value, const OFBool check) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultItem) + { + result = (check) ? DcmShortString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = AfterloaderChannelID.putOFStringArray(value); + } + return result; +} + + +OFCondition DRTChannelSequence::Item::setChannelEffectiveLength(const OFString &value, const OFBool check) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultItem) + { + result = (check) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = ChannelEffectiveLength.putOFStringArray(value); + } + return result; +} + + +OFCondition DRTChannelSequence::Item::setChannelInnerLength(const OFString &value, const OFBool check) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultItem) + { + result = (check) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = ChannelInnerLength.putOFStringArray(value); + } + return result; +} + + OFCondition DRTChannelSequence::Item::setChannelLength(const OFString &value, const OFBool check) { OFCondition result = EC_IllegalCall; @@ -808,6 +938,19 @@ OFCondition DRTChannelSequence::Item::setSourceApplicatorStepSize(const OFString } +OFCondition DRTChannelSequence::Item::setSourceApplicatorTipLength(const OFString &value, const OFBool check) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultItem) + { + result = (check) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = SourceApplicatorTipLength.putOFStringArray(value); + } + return result; +} + + OFCondition DRTChannelSequence::Item::setSourceApplicatorType(const OFString &value, const OFBool check) { OFCondition result = EC_IllegalCall; diff --git a/dcmrt/libsrc/drtcims.cc b/dcmrt/libsrc/drtcims.cc index 1590dd53..6cc3c2e0 100644 --- a/dcmrt/libsrc/drtcims.cc +++ b/dcmrt/libsrc/drtcims.cc @@ -6,8 +6,8 @@ * * Source file for class DRTContentItemModifierSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -28,6 +28,7 @@ DRTContentItemModifierSequence::Item::Item(const OFBool emptyDefaultItem) FloatingPointValue(DCM_FloatingPointValue), MeasurementUnitsCodeSequence(emptyDefaultItem /*emptyDefaultSequence*/), NumericValue(DCM_NumericValue), + ObservationDateTime(DCM_ObservationDateTime), PersonName(DCM_PersonName), RationalDenominatorValue(DCM_RationalDenominatorValue), RationalNumeratorValue(DCM_RationalNumeratorValue), @@ -49,6 +50,7 @@ DRTContentItemModifierSequence::Item::Item(const Item ©) FloatingPointValue(copy.FloatingPointValue), MeasurementUnitsCodeSequence(copy.MeasurementUnitsCodeSequence), NumericValue(copy.NumericValue), + ObservationDateTime(copy.ObservationDateTime), PersonName(copy.PersonName), RationalDenominatorValue(copy.RationalDenominatorValue), RationalNumeratorValue(copy.RationalNumeratorValue), @@ -78,6 +80,7 @@ DRTContentItemModifierSequence::Item &DRTContentItemModifierSequence::Item::oper FloatingPointValue = copy.FloatingPointValue; MeasurementUnitsCodeSequence = copy.MeasurementUnitsCodeSequence; NumericValue = copy.NumericValue; + ObservationDateTime = copy.ObservationDateTime; PersonName = copy.PersonName; RationalDenominatorValue = copy.RationalDenominatorValue; RationalNumeratorValue = copy.RationalNumeratorValue; @@ -97,6 +100,7 @@ void DRTContentItemModifierSequence::Item::clear() { /* clear all DICOM attributes */ ValueType.clear(); + ObservationDateTime.clear(); ConceptNameCodeSequence.clear(); DateTime.clear(); Date.clear(); @@ -118,6 +122,7 @@ void DRTContentItemModifierSequence::Item::clear() OFBool DRTContentItemModifierSequence::Item::isEmpty() { return ValueType.isEmpty() && + ObservationDateTime.isEmpty() && ConceptNameCodeSequence.isEmpty() && DateTime.isEmpty() && Date.isEmpty() && @@ -149,6 +154,7 @@ OFCondition DRTContentItemModifierSequence::Item::read(DcmItem &item) /* re-initialize object */ clear(); getAndCheckElementFromDataset(item, ValueType, "1", "1", "ContentItemModifierSequence"); + getAndCheckElementFromDataset(item, ObservationDateTime, "1", "3", "ContentItemModifierSequence"); ConceptNameCodeSequence.read(item, "1-n", "1", "ContentItemModifierSequence"); getAndCheckElementFromDataset(item, DateTime, "1", "1C", "ContentItemModifierSequence"); getAndCheckElementFromDataset(item, Date, "1", "1C", "ContentItemModifierSequence"); @@ -176,6 +182,7 @@ OFCondition DRTContentItemModifierSequence::Item::write(DcmItem &item) { result = EC_Normal; addElementToDataset(result, item, new DcmCodeString(ValueType), "1", "1", "ContentItemModifierSequence"); + addElementToDataset(result, item, new DcmDateTime(ObservationDateTime), "1", "3", "ContentItemModifierSequence"); if (result.good()) result = ConceptNameCodeSequence.write(item, "1-n", "1", "ContentItemModifierSequence"); addElementToDataset(result, item, new DcmDateTime(DateTime), "1", "1C", "ContentItemModifierSequence"); addElementToDataset(result, item, new DcmDate(Date), "1", "1C", "ContentItemModifierSequence"); @@ -249,6 +256,15 @@ OFCondition DRTContentItemModifierSequence::Item::getNumericValue(OFVector 0) && (iterator != last)) + ++iterator; + /* specified list item found? */ + if ((idx == 0) && (iterator != last)) + result = EC_Normal; + else + result = EC_IllegalParameter; + } + return result; +} + + +OFCondition DRTCodingSchemeResourcesSequence::gotoItem(const size_t num, OFListConstIterator(Item *) &iterator) const +{ + OFCondition result = EC_IllegalCall; + if (!SequenceOfItems.empty()) + { + size_t idx = num + 1; + iterator = SequenceOfItems.begin(); + const OFListConstIterator(Item *) last = SequenceOfItems.end(); + while ((--idx > 0) && (iterator != last)) + ++iterator; + /* specified list item found? */ + if ((idx == 0) && (iterator != last)) + result = EC_Normal; + else + result = EC_IllegalParameter; + } + return result; +} + + +OFCondition DRTCodingSchemeResourcesSequence::gotoItem(const size_t num) +{ + return gotoItem(num, CurrentItem); +} + + +OFCondition DRTCodingSchemeResourcesSequence::getCurrentItem(Item *&item) const +{ + OFCondition result = EC_IllegalCall; + if (CurrentItem != SequenceOfItems.end()) + { + item = *CurrentItem; + result = EC_Normal; + } + return result; +} + + +DRTCodingSchemeResourcesSequence::Item &DRTCodingSchemeResourcesSequence::getCurrentItem() +{ + if (CurrentItem != SequenceOfItems.end()) + return **CurrentItem; + else + return EmptyItem; +} + + +const DRTCodingSchemeResourcesSequence::Item &DRTCodingSchemeResourcesSequence::getCurrentItem() const +{ + if (CurrentItem != SequenceOfItems.end()) + return **CurrentItem; + else + return EmptyItem; +} + + +OFCondition DRTCodingSchemeResourcesSequence::getItem(const size_t num, Item *&item) +{ + OFListIterator(Item *) iterator; + OFCondition result = gotoItem(num, iterator); + if (result.good()) + item = *iterator; + return result; +} + + +DRTCodingSchemeResourcesSequence::Item &DRTCodingSchemeResourcesSequence::getItem(const size_t num) +{ + OFListIterator(Item *) iterator; + if (gotoItem(num, iterator).good()) + return **iterator; + else + return EmptyItem; +} + + +const DRTCodingSchemeResourcesSequence::Item &DRTCodingSchemeResourcesSequence::getItem(const size_t num) const +{ + OFListConstIterator(Item *) iterator; + if (gotoItem(num, iterator).good()) + return **iterator; + else + return EmptyItem; +} + + +DRTCodingSchemeResourcesSequence::Item &DRTCodingSchemeResourcesSequence::operator[](const size_t num) +{ + return getItem(num); +} + + +const DRTCodingSchemeResourcesSequence::Item &DRTCodingSchemeResourcesSequence::operator[](const size_t num) const +{ + return getItem(num); +} + + +OFCondition DRTCodingSchemeResourcesSequence::addItem(Item *&item) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultSequence) + { + item = new Item(); + if (item != NULL) + { + SequenceOfItems.push_back(item); + result = EC_Normal; + } else + result = EC_MemoryExhausted; + } + return result; +} + + +OFCondition DRTCodingSchemeResourcesSequence::insertItem(const size_t pos, Item *&item) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultSequence) + { + OFListIterator(Item *) iterator; + result = gotoItem(pos, iterator); + if (result.good()) + { + item = new Item(); + if (item != NULL) + { + SequenceOfItems.insert(iterator, 1, item); + result = EC_Normal; + } else + result = EC_MemoryExhausted; + } else + result = addItem(item); + } + return result; +} + + +OFCondition DRTCodingSchemeResourcesSequence::removeItem(const size_t pos) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultSequence) + { + OFListIterator(Item *) iterator; + if (gotoItem(pos, iterator).good()) + { + delete *iterator; + iterator = SequenceOfItems.erase(iterator); + result = EC_Normal; + } else + result = EC_IllegalParameter; + } + return result; +} + + +OFCondition DRTCodingSchemeResourcesSequence::read(DcmItem &dataset, + const OFString &card, + const OFString &type, + const char *moduleName) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultSequence) + { + /* re-initialize object */ + clear(); + /* retrieve sequence element from dataset */ + DcmSequenceOfItems *sequence; + result = dataset.findAndGetSequence(DCM_CodingSchemeResourcesSequence, sequence); + if (sequence != NULL) + { + if (checkElementValue(*sequence, card, type, result, moduleName)) + { + DcmStack stack; + OFBool first = OFTrue; + /* iterate over all sequence items */ + while (result.good() && sequence->nextObject(stack, first /*intoSub*/).good()) + { + DcmItem *ditem = OFstatic_cast(DcmItem *, stack.top()); + if (ditem != NULL) + { + Item *item = new Item(); + if (item != NULL) + { + result = item->read(*ditem); + if (result.good()) + { + /* append new item to the end of the list */ + SequenceOfItems.push_back(item); + first = OFFalse; + } + } else + result = EC_MemoryExhausted; + } else + result = EC_CorruptedData; + } + } + } else { + DcmSequenceOfItems element(DCM_CodingSchemeResourcesSequence); + checkElementValue(element, card, type, result, moduleName); + } + } + return result; +} + + +OFCondition DRTCodingSchemeResourcesSequence::write(DcmItem &dataset, + const OFString &card, + const OFString &type, + const char *moduleName) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultSequence) + { + result = EC_MemoryExhausted; + DcmSequenceOfItems *sequence = new DcmSequenceOfItems(DCM_CodingSchemeResourcesSequence); + if (sequence != NULL) + { + result = EC_Normal; + /* an empty optional sequence is not written */ + if ((type == "2") || !SequenceOfItems.empty()) + { + OFListIterator(Item *) iterator = SequenceOfItems.begin(); + const OFListConstIterator(Item *) last = SequenceOfItems.end(); + /* iterate over all sequence items */ + while (result.good() && (iterator != last)) + { + DcmItem *item = new DcmItem(); + if (item != NULL) + { + /* append new item to the end of the sequence */ + result = sequence->append(item); + if (result.good()) + { + result = (*iterator)->write(*item); + ++iterator; + } else + delete item; + } else + result = EC_MemoryExhausted; + } + if (result.good()) + { + /* insert sequence element into the dataset */ + result = dataset.insert(sequence, OFTrue /*replaceOld*/); + } + if (DCM_dcmrtLogger.isEnabledFor(OFLogger::WARN_LOG_LEVEL)) + checkElementValue(*sequence, card, type, result, moduleName); + if (result.good()) + { + /* forget reference to sequence object (avoid deletion below) */ + sequence = NULL; + } + } + else if (type == "1") + { + /* empty type 1 sequence not allowed */ + result = RT_EC_InvalidValue; + if (DCM_dcmrtLogger.isEnabledFor(OFLogger::WARN_LOG_LEVEL)) + checkElementValue(*sequence, card, type, result, moduleName); + } + /* delete sequence (if not inserted into the dataset) */ + delete sequence; + } + } + return result; +} + + +// end of source file diff --git a/dcmrt/libsrc/drtcss.cc b/dcmrt/libsrc/drtcss.cc index be2ebd88..229c0620 100644 --- a/dcmrt/libsrc/drtcss.cc +++ b/dcmrt/libsrc/drtcss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTChannelSourceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdcs.cc b/dcmrt/libsrc/drtdcs.cc index 17a2dbf1..d5222b38 100644 --- a/dcmrt/libsrc/drtdcs.cc +++ b/dcmrt/libsrc/drtdcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDerivationCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdddps.cc b/dcmrt/libsrc/drtdddps.cc index 4ad89659..7a4f351f 100644 --- a/dcmrt/libsrc/drtdddps.cc +++ b/dcmrt/libsrc/drtdddps.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDeliveredDepthDoseParametersSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtddps.cc b/dcmrt/libsrc/drtddps.cc index 92b3bb10..4227d759 100644 --- a/dcmrt/libsrc/drtddps.cc +++ b/dcmrt/libsrc/drtddps.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDepthDoseParametersSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdias.cc b/dcmrt/libsrc/drtdias.cc index a474ac85..41b64cfa 100644 --- a/dcmrt/libsrc/drtdias.cc +++ b/dcmrt/libsrc/drtdias.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDeidentificationActionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdimcs.cc b/dcmrt/libsrc/drtdimcs.cc index 1b924b87..750b3169 100644 --- a/dcmrt/libsrc/drtdimcs.cc +++ b/dcmrt/libsrc/drtdimcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDeidentificationMethodCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdimrs.cc b/dcmrt/libsrc/drtdimrs.cc index b85ed7d0..8aef4e48 100644 --- a/dcmrt/libsrc/drtdimrs.cc +++ b/dcmrt/libsrc/drtdimrs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDICOMMediaRetrievalSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdirs.cc b/dcmrt/libsrc/drtdirs.cc index b7cd79cc..f1fad2c6 100644 --- a/dcmrt/libsrc/drtdirs.cc +++ b/dcmrt/libsrc/drtdirs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDICOMRetrievalSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdose.cc b/dcmrt/libsrc/drtdose.cc index c29c1152..9b63bbbd 100644 --- a/dcmrt/libsrc/drtdose.cc +++ b/dcmrt/libsrc/drtdose.cc @@ -6,9 +6,8 @@ * * Source file for class DRTDoseIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 - * Last modified on 2017-06-15 by Riesmeier + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -32,7 +31,6 @@ DRTDoseIOD::DRTDoseIOD() QualityControlSubject(DCM_QualityControlSubject), ReferencedPatientSequence(), PatientBirthTime(DCM_PatientBirthTime), - OtherPatientIDs(DCM_RETIRED_OtherPatientIDs), OtherPatientIDsSequence(), OtherPatientNames(DCM_OtherPatientNames), EthnicGroup(DCM_EthnicGroup), @@ -109,6 +107,8 @@ DRTDoseIOD::DRTDoseIOD() PatientSexNeutered(DCM_PatientSexNeutered), ClinicalTrialTimePointID(DCM_ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(DCM_ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(DCM_LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(DCM_LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(), Modality(DCM_Modality), SeriesInstanceUID(DCM_SeriesInstanceUID), @@ -149,8 +149,6 @@ DRTDoseIOD::DRTDoseIOD() TimeOfLastCalibration(DCM_TimeOfLastCalibration), PixelPaddingValue(DCM_PixelPaddingValue), PatientOrientation(DCM_PatientOrientation), - ContentDate(DCM_ContentDate), - ContentTime(DCM_ContentTime), ImageType(DCM_ImageType), AcquisitionNumber(DCM_AcquisitionNumber), AcquisitionDate(DCM_AcquisitionDate), @@ -218,6 +216,8 @@ DRTDoseIOD::DRTDoseIOD() BitsStored(DCM_BitsStored), HighBit(DCM_HighBit), PixelRepresentation(DCM_PixelRepresentation), + ContentDate(DCM_ContentDate), + ContentTime(DCM_ContentTime), DoseUnits(DCM_DoseUnits), DoseType(DCM_DoseType), SpatialTransformOfDose(DCM_SpatialTransformOfDose), @@ -298,7 +298,6 @@ DRTDoseIOD::DRTDoseIOD(const DRTDoseIOD ©) QualityControlSubject(copy.QualityControlSubject), ReferencedPatientSequence(copy.ReferencedPatientSequence), PatientBirthTime(copy.PatientBirthTime), - OtherPatientIDs(copy.OtherPatientIDs), OtherPatientIDsSequence(copy.OtherPatientIDsSequence), OtherPatientNames(copy.OtherPatientNames), EthnicGroup(copy.EthnicGroup), @@ -375,6 +374,8 @@ DRTDoseIOD::DRTDoseIOD(const DRTDoseIOD ©) PatientSexNeutered(copy.PatientSexNeutered), ClinicalTrialTimePointID(copy.ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(copy.ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(copy.LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(copy.LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(copy.ConsentForClinicalTrialUseSequence), Modality(copy.Modality), SeriesInstanceUID(copy.SeriesInstanceUID), @@ -415,8 +416,6 @@ DRTDoseIOD::DRTDoseIOD(const DRTDoseIOD ©) TimeOfLastCalibration(copy.TimeOfLastCalibration), PixelPaddingValue(copy.PixelPaddingValue), PatientOrientation(copy.PatientOrientation), - ContentDate(copy.ContentDate), - ContentTime(copy.ContentTime), ImageType(copy.ImageType), AcquisitionNumber(copy.AcquisitionNumber), AcquisitionDate(copy.AcquisitionDate), @@ -484,6 +483,8 @@ DRTDoseIOD::DRTDoseIOD(const DRTDoseIOD ©) BitsStored(copy.BitsStored), HighBit(copy.HighBit), PixelRepresentation(copy.PixelRepresentation), + ContentDate(copy.ContentDate), + ContentTime(copy.ContentTime), DoseUnits(copy.DoseUnits), DoseType(copy.DoseType), SpatialTransformOfDose(copy.SpatialTransformOfDose), @@ -570,7 +571,6 @@ DRTDoseIOD &DRTDoseIOD::operator=(const DRTDoseIOD ©) QualityControlSubject = copy.QualityControlSubject; ReferencedPatientSequence = copy.ReferencedPatientSequence; PatientBirthTime = copy.PatientBirthTime; - OtherPatientIDs = copy.OtherPatientIDs; OtherPatientIDsSequence = copy.OtherPatientIDsSequence; OtherPatientNames = copy.OtherPatientNames; EthnicGroup = copy.EthnicGroup; @@ -647,6 +647,8 @@ DRTDoseIOD &DRTDoseIOD::operator=(const DRTDoseIOD ©) PatientSexNeutered = copy.PatientSexNeutered; ClinicalTrialTimePointID = copy.ClinicalTrialTimePointID; ClinicalTrialTimePointDescription = copy.ClinicalTrialTimePointDescription; + LongitudinalTemporalOffsetFromEvent = copy.LongitudinalTemporalOffsetFromEvent; + LongitudinalTemporalEventType = copy.LongitudinalTemporalEventType; ConsentForClinicalTrialUseSequence = copy.ConsentForClinicalTrialUseSequence; Modality = copy.Modality; SeriesInstanceUID = copy.SeriesInstanceUID; @@ -687,8 +689,6 @@ DRTDoseIOD &DRTDoseIOD::operator=(const DRTDoseIOD ©) TimeOfLastCalibration = copy.TimeOfLastCalibration; PixelPaddingValue = copy.PixelPaddingValue; PatientOrientation = copy.PatientOrientation; - ContentDate = copy.ContentDate; - ContentTime = copy.ContentTime; ImageType = copy.ImageType; AcquisitionNumber = copy.AcquisitionNumber; AcquisitionDate = copy.AcquisitionDate; @@ -756,6 +756,8 @@ DRTDoseIOD &DRTDoseIOD::operator=(const DRTDoseIOD ©) BitsStored = copy.BitsStored; HighBit = copy.HighBit; PixelRepresentation = copy.PixelRepresentation; + ContentDate = copy.ContentDate; + ContentTime = copy.ContentTime; DoseUnits = copy.DoseUnits; DoseType = copy.DoseType; SpatialTransformOfDose = copy.SpatialTransformOfDose; @@ -837,7 +839,6 @@ void DRTDoseIOD::clear() QualityControlSubject.clear(); ReferencedPatientSequence.clear(); PatientBirthTime.clear(); - OtherPatientIDs.clear(); OtherPatientIDsSequence.clear(); OtherPatientNames.clear(); EthnicGroup.clear(); @@ -914,6 +915,8 @@ void DRTDoseIOD::clear() PatientSexNeutered.clear(); ClinicalTrialTimePointID.clear(); ClinicalTrialTimePointDescription.clear(); + LongitudinalTemporalOffsetFromEvent.clear(); + LongitudinalTemporalEventType.clear(); ConsentForClinicalTrialUseSequence.clear(); Modality.clear(); SeriesInstanceUID.clear(); @@ -1153,8 +1156,8 @@ OFCondition DRTDoseIOD::read(DcmItem &dataset) // --- GeneralImageModule (C) --- // getAndCheckElementFromDataset(dataset, InstanceNumber, "1", "2", "GeneralImageModule"); getAndCheckElementFromDataset(dataset, PatientOrientation, "2", "2C", "GeneralImageModule"); - getAndCheckElementFromDataset(dataset, ContentDate, "1", "2C", "GeneralImageModule"); - getAndCheckElementFromDataset(dataset, ContentTime, "1", "2C", "GeneralImageModule"); + // getAndCheckElementFromDataset(dataset, ContentDate, "1", "2C", "GeneralImageModule"); + // getAndCheckElementFromDataset(dataset, ContentTime, "1", "2C", "GeneralImageModule"); getAndCheckElementFromDataset(dataset, ImageType, "2-n", "3", "GeneralImageModule"); getAndCheckElementFromDataset(dataset, AcquisitionNumber, "1", "3", "GeneralImageModule"); getAndCheckElementFromDataset(dataset, AcquisitionDate, "1", "3", "GeneralImageModule"); @@ -1268,6 +1271,8 @@ OFCondition DRTDoseIOD::read(DcmItem &dataset) getAndCheckElementFromDataset(dataset, BitsStored, "1", "1C", "RTDoseModule"); getAndCheckElementFromDataset(dataset, HighBit, "1", "1C", "RTDoseModule"); getAndCheckElementFromDataset(dataset, PixelRepresentation, "1", "1C", "RTDoseModule"); + getAndCheckElementFromDataset(dataset, ContentDate, "1", "3", "RTDoseModule"); + getAndCheckElementFromDataset(dataset, ContentTime, "1", "3", "RTDoseModule"); getAndCheckElementFromDataset(dataset, DoseUnits, "1", "1", "RTDoseModule"); getAndCheckElementFromDataset(dataset, DoseType, "1", "1", "RTDoseModule"); getAndCheckElementFromDataset(dataset, SpatialTransformOfDose, "1", "3", "RTDoseModule"); @@ -1386,7 +1391,6 @@ OFCondition DRTDoseIOD::readPatientData(DcmItem &dataset) getAndCheckElementFromDataset(dataset, QualityControlSubject, "1", "3", "PatientModule"); ReferencedPatientSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, PatientBirthTime, "1", "3", "PatientModule"); - getAndCheckElementFromDataset(dataset, OtherPatientIDs, "1-n", "3", "PatientModule"); OtherPatientIDsSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, OtherPatientNames, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, EthnicGroup, "1", "3", "PatientModule"); @@ -1489,6 +1493,8 @@ OFCondition DRTDoseIOD::readStudyData(DcmItem &dataset) { getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointID, "1", "2", "ClinicalTrialStudyModule"); getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointDescription, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalOffsetFromEvent, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalEventType, "1", "1C", "ClinicalTrialStudyModule"); ConsentForClinicalTrialUseSequence.read(dataset, "1-n", "3", "ClinicalTrialStudyModule"); } } @@ -1558,7 +1564,6 @@ OFCondition DRTDoseIOD::write(DcmItem &dataset) addElementToDataset(result, dataset, new DcmCodeString(QualityControlSubject), "1", "3", "PatientModule"); if (result.good()) result = ReferencedPatientSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmTime(PatientBirthTime), "1", "3", "PatientModule"); - addElementToDataset(result, dataset, new DcmLongString(OtherPatientIDs), "1-n", "3", "PatientModule"); if (result.good()) result = OtherPatientIDsSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmPersonName(OtherPatientNames), "1-n", "3", "PatientModule"); addElementToDataset(result, dataset, new DcmShortString(EthnicGroup), "1", "3", "PatientModule"); @@ -1651,6 +1656,8 @@ OFCondition DRTDoseIOD::write(DcmItem &dataset) { addElementToDataset(result, dataset, new DcmLongString(ClinicalTrialTimePointID), "1", "2", "ClinicalTrialStudyModule"); addElementToDataset(result, dataset, new DcmShortText(ClinicalTrialTimePointDescription), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmFloatingPointDouble(LongitudinalTemporalOffsetFromEvent), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmCodeString(LongitudinalTemporalEventType), "1", "1C", "ClinicalTrialStudyModule"); if (result.good()) result = ConsentForClinicalTrialUseSequence.write(dataset, "1-n" ,"3", "ClinicalTrialStudyModule"); } @@ -1708,8 +1715,8 @@ OFCondition DRTDoseIOD::write(DcmItem &dataset) { // addElementToDataset(result, dataset, new DcmIntegerString(InstanceNumber), "1", "2", "GeneralImageModule"); addElementToDataset(result, dataset, new DcmCodeString(PatientOrientation), "2", "2C", "GeneralImageModule"); - addElementToDataset(result, dataset, new DcmDate(ContentDate), "1", "2C", "GeneralImageModule"); - addElementToDataset(result, dataset, new DcmTime(ContentTime), "1", "2C", "GeneralImageModule"); + // addElementToDataset(result, dataset, new DcmDate(ContentDate), "1", "2C", "GeneralImageModule"); + // addElementToDataset(result, dataset, new DcmTime(ContentTime), "1", "2C", "GeneralImageModule"); addElementToDataset(result, dataset, new DcmCodeString(ImageType), "2-n", "3", "GeneralImageModule"); addElementToDataset(result, dataset, new DcmIntegerString(AcquisitionNumber), "1", "3", "GeneralImageModule"); addElementToDataset(result, dataset, new DcmDate(AcquisitionDate), "1", "3", "GeneralImageModule"); @@ -1816,6 +1823,8 @@ OFCondition DRTDoseIOD::write(DcmItem &dataset) addElementToDataset(result, dataset, new DcmUnsignedShort(BitsStored), "1", "1C", "RTDoseModule"); addElementToDataset(result, dataset, new DcmUnsignedShort(HighBit), "1", "1C", "RTDoseModule"); addElementToDataset(result, dataset, new DcmUnsignedShort(PixelRepresentation), "1", "1C", "RTDoseModule"); + addElementToDataset(result, dataset, new DcmDate(ContentDate), "1", "3", "RTDoseModule"); + addElementToDataset(result, dataset, new DcmTime(ContentTime), "1", "3", "RTDoseModule"); addElementToDataset(result, dataset, new DcmCodeString(DoseUnits), "1", "1", "RTDoseModule"); addElementToDataset(result, dataset, new DcmCodeString(DoseType), "1", "1", "RTDoseModule"); addElementToDataset(result, dataset, new DcmCodeString(SpatialTransformOfDose), "1", "3", "RTDoseModule"); @@ -1972,6 +1981,8 @@ OFBool DRTDoseIOD::isClinicalTrialStudyModulePresent(const OFBool /*complete*/) /* check whether at least one attribute is present */ return !ClinicalTrialTimePointID.isEmpty() || !ClinicalTrialTimePointDescription.isEmpty() || + !LongitudinalTemporalOffsetFromEvent.isEmpty() || + !LongitudinalTemporalEventType.isEmpty() || !ConsentForClinicalTrialUseSequence.isEmpty(); } @@ -1989,8 +2000,6 @@ OFBool DRTDoseIOD::isGeneralImageModulePresent(const OFBool /*complete*/) { /* check whether at least one attribute is present */ return !PatientOrientation.isEmpty() || - !ContentDate.isEmpty() || - !ContentTime.isEmpty() || !ImageType.isEmpty() || !AcquisitionNumber.isEmpty() || !AcquisitionDate.isEmpty() || @@ -2741,12 +2750,24 @@ OFCondition DRTDoseIOD::getLastMenstrualDate(OFString &value, const signed long } +OFCondition DRTDoseIOD::getLongitudinalTemporalEventType(OFString &value, const signed long pos) const +{ + return getStringValueFromElement(LongitudinalTemporalEventType, value, pos); +} + + OFCondition DRTDoseIOD::getLongitudinalTemporalInformationModified(OFString &value, const signed long pos) const { return getStringValueFromElement(LongitudinalTemporalInformationModified, value, pos); } +OFCondition DRTDoseIOD::getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos) const +{ + return OFconst_cast(DcmFloatingPointDouble &, LongitudinalTemporalOffsetFromEvent).getFloat64(value, pos); +} + + OFCondition DRTDoseIOD::getLossyImageCompression(OFString &value, const signed long pos) const { return getStringValueFromElement(LossyImageCompression, value, pos); @@ -2891,12 +2912,6 @@ OFCondition DRTDoseIOD::getOriginalSpecializedSOPClassUID(OFString &value, const } -OFCondition DRTDoseIOD::getOtherPatientIDs(OFString &value, const signed long pos) const -{ - return getStringValueFromElement(OtherPatientIDs, value, pos); -} - - OFCondition DRTDoseIOD::getOtherPatientNames(OFString &value, const signed long pos) const { return getStringValueFromElement(OtherPatientNames, value, pos); @@ -4244,6 +4259,15 @@ OFCondition DRTDoseIOD::setLastMenstrualDate(const OFString &value, const OFBool } +OFCondition DRTDoseIOD::setLongitudinalTemporalEventType(const OFString &value, const OFBool check) +{ + OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = LongitudinalTemporalEventType.putOFStringArray(value); + return result; +} + + OFCondition DRTDoseIOD::setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; @@ -4253,6 +4277,12 @@ OFCondition DRTDoseIOD::setLongitudinalTemporalInformationModified(const OFStrin } +OFCondition DRTDoseIOD::setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos) +{ + return LongitudinalTemporalOffsetFromEvent.putFloat64(value, pos); +} + + OFCondition DRTDoseIOD::setLossyImageCompression(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; @@ -4397,15 +4427,6 @@ OFCondition DRTDoseIOD::setOriginalSpecializedSOPClassUID(const OFString &value, } -OFCondition DRTDoseIOD::setOtherPatientIDs(const OFString &value, const OFBool check) -{ - OFCondition result = (check) ? DcmLongString::checkStringValue(value, "1-n") : EC_Normal; - if (result.good()) - result = OtherPatientIDs.putOFStringArray(value); - return result; -} - - OFCondition DRTDoseIOD::setOtherPatientNames(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmPersonName::checkStringValue(value, "1-n") : EC_Normal; diff --git a/dcmrt/libsrc/drtdrs.cc b/dcmrt/libsrc/drtdrs.cc index dc11e75d..eb7d44f8 100644 --- a/dcmrt/libsrc/drtdrs.cc +++ b/dcmrt/libsrc/drtdrs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtds.cc b/dcmrt/libsrc/drtds.cc index 0b76ad60..40c8d5b4 100644 --- a/dcmrt/libsrc/drtds.cc +++ b/dcmrt/libsrc/drtds.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdspcs.cc b/dcmrt/libsrc/drtdspcs.cc index a5cd3a90..e3a9c363 100644 --- a/dcmrt/libsrc/drtdspcs.cc +++ b/dcmrt/libsrc/drtdspcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDigitalSignaturePurposeCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdss.cc b/dcmrt/libsrc/drtdss.cc index d9a64ebe..dd10c99d 100644 --- a/dcmrt/libsrc/drtdss.cc +++ b/dcmrt/libsrc/drtdss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDigitalSignaturesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdvhs.cc b/dcmrt/libsrc/drtdvhs.cc index 1498eeea..5757d3d6 100644 --- a/dcmrt/libsrc/drtdvhs.cc +++ b/dcmrt/libsrc/drtdvhs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDVHSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtdvrrs.cc b/dcmrt/libsrc/drtdvrrs.cc index 9f099508..27bbfa9f 100644 --- a/dcmrt/libsrc/drtdvrrs.cc +++ b/dcmrt/libsrc/drtdvrrs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTDVHReferencedROISequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drteas.cc b/dcmrt/libsrc/drteas.cc index a87abfeb..f7b361bf 100644 --- a/dcmrt/libsrc/drteas.cc +++ b/dcmrt/libsrc/drteas.cc @@ -6,8 +6,8 @@ * * Source file for class DRTEncryptedAttributesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtecs.cc b/dcmrt/libsrc/drtecs.cc index 530a87c7..35ca822a 100644 --- a/dcmrt/libsrc/drtecs.cc +++ b/dcmrt/libsrc/drtecs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTEquivalentCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtes.cc b/dcmrt/libsrc/drtes.cc index 168d5347..50eab423 100644 --- a/dcmrt/libsrc/drtes.cc +++ b/dcmrt/libsrc/drtes.cc @@ -6,8 +6,8 @@ * * Source file for class DRTExposureSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtfds.cc b/dcmrt/libsrc/drtfds.cc index fcb7245f..91188714 100644 --- a/dcmrt/libsrc/drtfds.cc +++ b/dcmrt/libsrc/drtfds.cc @@ -6,8 +6,8 @@ * * Source file for class DRTFixationDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtfes.cc b/dcmrt/libsrc/drtfes.cc index 22c9efc6..f1e4e01c 100644 --- a/dcmrt/libsrc/drtfes.cc +++ b/dcmrt/libsrc/drtfes.cc @@ -6,8 +6,8 @@ * * Source file for class DRTFrameExtractionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtfgs.cc b/dcmrt/libsrc/drtfgs.cc index 5294e46a..d0f1d7be 100644 --- a/dcmrt/libsrc/drtfgs.cc +++ b/dcmrt/libsrc/drtfgs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTFractionGroupSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtfgss.cc b/dcmrt/libsrc/drtfgss.cc index 563b6f65..c8864be2 100644 --- a/dcmrt/libsrc/drtfgss.cc +++ b/dcmrt/libsrc/drtfgss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTFractionGroupSummarySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtfms.cc b/dcmrt/libsrc/drtfms.cc index 88cbf35a..7ff101ae 100644 --- a/dcmrt/libsrc/drtfms.cc +++ b/dcmrt/libsrc/drtfms.cc @@ -6,8 +6,8 @@ * * Source file for class DRTFluenceMapSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtfsss.cc b/dcmrt/libsrc/drtfsss.cc index fc8d26d8..d5dfc7e2 100644 --- a/dcmrt/libsrc/drtfsss.cc +++ b/dcmrt/libsrc/drtfsss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTFractionStatusSummarySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtgas.cc b/dcmrt/libsrc/drtgas.cc index 84fd9d74..aa4dc17e 100644 --- a/dcmrt/libsrc/drtgas.cc +++ b/dcmrt/libsrc/drtgas.cc @@ -6,8 +6,8 @@ * * Source file for class DRTGeneralAccessorySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtgmcs.cc b/dcmrt/libsrc/drtgmcs.cc index 6e81ca2f..99ba839c 100644 --- a/dcmrt/libsrc/drtgmcs.cc +++ b/dcmrt/libsrc/drtgmcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTGeneticModificationsCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtgms.cc b/dcmrt/libsrc/drtgms.cc index f8ab36b3..84d56347 100644 --- a/dcmrt/libsrc/drtgms.cc +++ b/dcmrt/libsrc/drtgms.cc @@ -6,8 +6,8 @@ * * Source file for class DRTGeneticModificationsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtgpis.cc b/dcmrt/libsrc/drtgpis.cc index 2773490e..c9cc891a 100644 --- a/dcmrt/libsrc/drtgpis.cc +++ b/dcmrt/libsrc/drtgpis.cc @@ -6,8 +6,8 @@ * * Source file for class DRTGroupOfPatientsIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drthsdrs.cc b/dcmrt/libsrc/drthsdrs.cc index 6606ca42..97b558e6 100644 --- a/dcmrt/libsrc/drthsdrs.cc +++ b/dcmrt/libsrc/drthsdrs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTHL7StructuredDocumentReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtiais.cc b/dcmrt/libsrc/drtiais.cc index 4b071c57..fb686b6e 100644 --- a/dcmrt/libsrc/drtiais.cc +++ b/dcmrt/libsrc/drtiais.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIssuerOfAdmissionIDSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtians.cc b/dcmrt/libsrc/drtians.cc index d2bde19f..3ad028dc 100644 --- a/dcmrt/libsrc/drtians.cc +++ b/dcmrt/libsrc/drtians.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIssuerOfAccessionNumberSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtiblds.cc b/dcmrt/libsrc/drtiblds.cc index 48802092..5f3e32f5 100644 --- a/dcmrt/libsrc/drtiblds.cc +++ b/dcmrt/libsrc/drtiblds.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonBeamLimitingDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtibls.cc b/dcmrt/libsrc/drtibls.cc index 3ed8c017..acf50a19 100644 --- a/dcmrt/libsrc/drtibls.cc +++ b/dcmrt/libsrc/drtibls.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonBlockSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtibs.cc b/dcmrt/libsrc/drtibs.cc index 69a9f292..feca160d 100644 --- a/dcmrt/libsrc/drtibs.cc +++ b/dcmrt/libsrc/drtibs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonBeamSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drticpds.cc b/dcmrt/libsrc/drticpds.cc index a8978d63..c21f51de 100644 --- a/dcmrt/libsrc/drticpds.cc +++ b/dcmrt/libsrc/drticpds.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonControlPointDeliverySequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drticps.cc b/dcmrt/libsrc/drticps.cc index 9e179309..8380160b 100644 --- a/dcmrt/libsrc/drticps.cc +++ b/dcmrt/libsrc/drticps.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonControlPointSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtics.cc b/dcmrt/libsrc/drtics.cc index ec875607..f308acb7 100644 --- a/dcmrt/libsrc/drtics.cc +++ b/dcmrt/libsrc/drtics.cc @@ -6,8 +6,8 @@ * * Source file for class DRTInstitutionCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtiis.cc b/dcmrt/libsrc/drtiis.cc index 535a5ba6..db2224bc 100644 --- a/dcmrt/libsrc/drtiis.cc +++ b/dcmrt/libsrc/drtiis.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIconImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtimage.cc b/dcmrt/libsrc/drtimage.cc index f9ad54d2..d34aba4d 100644 --- a/dcmrt/libsrc/drtimage.cc +++ b/dcmrt/libsrc/drtimage.cc @@ -6,9 +6,8 @@ * * Source file for class DRTImageIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 - * Last modified on 2017-06-15 by Riesmeier + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -32,7 +31,6 @@ DRTImageIOD::DRTImageIOD() QualityControlSubject(DCM_QualityControlSubject), ReferencedPatientSequence(), PatientBirthTime(DCM_PatientBirthTime), - OtherPatientIDs(DCM_RETIRED_OtherPatientIDs), OtherPatientIDsSequence(), OtherPatientNames(DCM_OtherPatientNames), EthnicGroup(DCM_EthnicGroup), @@ -109,6 +107,8 @@ DRTImageIOD::DRTImageIOD() PatientSexNeutered(DCM_PatientSexNeutered), ClinicalTrialTimePointID(DCM_ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(DCM_ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(DCM_LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(DCM_LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(), Modality(DCM_Modality), SeriesInstanceUID(DCM_SeriesInstanceUID), @@ -333,7 +333,6 @@ DRTImageIOD::DRTImageIOD(const DRTImageIOD ©) QualityControlSubject(copy.QualityControlSubject), ReferencedPatientSequence(copy.ReferencedPatientSequence), PatientBirthTime(copy.PatientBirthTime), - OtherPatientIDs(copy.OtherPatientIDs), OtherPatientIDsSequence(copy.OtherPatientIDsSequence), OtherPatientNames(copy.OtherPatientNames), EthnicGroup(copy.EthnicGroup), @@ -410,6 +409,8 @@ DRTImageIOD::DRTImageIOD(const DRTImageIOD ©) PatientSexNeutered(copy.PatientSexNeutered), ClinicalTrialTimePointID(copy.ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(copy.ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(copy.LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(copy.LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(copy.ConsentForClinicalTrialUseSequence), Modality(copy.Modality), SeriesInstanceUID(copy.SeriesInstanceUID), @@ -640,7 +641,6 @@ DRTImageIOD &DRTImageIOD::operator=(const DRTImageIOD ©) QualityControlSubject = copy.QualityControlSubject; ReferencedPatientSequence = copy.ReferencedPatientSequence; PatientBirthTime = copy.PatientBirthTime; - OtherPatientIDs = copy.OtherPatientIDs; OtherPatientIDsSequence = copy.OtherPatientIDsSequence; OtherPatientNames = copy.OtherPatientNames; EthnicGroup = copy.EthnicGroup; @@ -717,6 +717,8 @@ DRTImageIOD &DRTImageIOD::operator=(const DRTImageIOD ©) PatientSexNeutered = copy.PatientSexNeutered; ClinicalTrialTimePointID = copy.ClinicalTrialTimePointID; ClinicalTrialTimePointDescription = copy.ClinicalTrialTimePointDescription; + LongitudinalTemporalOffsetFromEvent = copy.LongitudinalTemporalOffsetFromEvent; + LongitudinalTemporalEventType = copy.LongitudinalTemporalEventType; ConsentForClinicalTrialUseSequence = copy.ConsentForClinicalTrialUseSequence; Modality = copy.Modality; SeriesInstanceUID = copy.SeriesInstanceUID; @@ -942,7 +944,6 @@ void DRTImageIOD::clear() QualityControlSubject.clear(); ReferencedPatientSequence.clear(); PatientBirthTime.clear(); - OtherPatientIDs.clear(); OtherPatientIDsSequence.clear(); OtherPatientNames.clear(); EthnicGroup.clear(); @@ -1019,6 +1020,8 @@ void DRTImageIOD::clear() PatientSexNeutered.clear(); ClinicalTrialTimePointID.clear(); ClinicalTrialTimePointDescription.clear(); + LongitudinalTemporalOffsetFromEvent.clear(); + LongitudinalTemporalEventType.clear(); ConsentForClinicalTrialUseSequence.clear(); Modality.clear(); SeriesInstanceUID.clear(); @@ -1533,7 +1536,6 @@ OFCondition DRTImageIOD::readPatientData(DcmItem &dataset) getAndCheckElementFromDataset(dataset, QualityControlSubject, "1", "3", "PatientModule"); ReferencedPatientSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, PatientBirthTime, "1", "3", "PatientModule"); - getAndCheckElementFromDataset(dataset, OtherPatientIDs, "1-n", "3", "PatientModule"); OtherPatientIDsSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, OtherPatientNames, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, EthnicGroup, "1", "3", "PatientModule"); @@ -1636,6 +1638,8 @@ OFCondition DRTImageIOD::readStudyData(DcmItem &dataset) { getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointID, "1", "2", "ClinicalTrialStudyModule"); getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointDescription, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalOffsetFromEvent, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalEventType, "1", "1C", "ClinicalTrialStudyModule"); ConsentForClinicalTrialUseSequence.read(dataset, "1-n", "3", "ClinicalTrialStudyModule"); } } @@ -1705,7 +1709,6 @@ OFCondition DRTImageIOD::write(DcmItem &dataset) addElementToDataset(result, dataset, new DcmCodeString(QualityControlSubject), "1", "3", "PatientModule"); if (result.good()) result = ReferencedPatientSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmTime(PatientBirthTime), "1", "3", "PatientModule"); - addElementToDataset(result, dataset, new DcmLongString(OtherPatientIDs), "1-n", "3", "PatientModule"); if (result.good()) result = OtherPatientIDsSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmPersonName(OtherPatientNames), "1-n", "3", "PatientModule"); addElementToDataset(result, dataset, new DcmShortString(EthnicGroup), "1", "3", "PatientModule"); @@ -1798,6 +1801,8 @@ OFCondition DRTImageIOD::write(DcmItem &dataset) { addElementToDataset(result, dataset, new DcmLongString(ClinicalTrialTimePointID), "1", "2", "ClinicalTrialStudyModule"); addElementToDataset(result, dataset, new DcmShortText(ClinicalTrialTimePointDescription), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmFloatingPointDouble(LongitudinalTemporalOffsetFromEvent), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmCodeString(LongitudinalTemporalEventType), "1", "1C", "ClinicalTrialStudyModule"); if (result.good()) result = ConsentForClinicalTrialUseSequence.write(dataset, "1-n" ,"3", "ClinicalTrialStudyModule"); } @@ -2145,6 +2150,8 @@ OFBool DRTImageIOD::isClinicalTrialStudyModulePresent(const OFBool /*complete*/) /* check whether at least one attribute is present */ return !ClinicalTrialTimePointID.isEmpty() || !ClinicalTrialTimePointDescription.isEmpty() || + !LongitudinalTemporalOffsetFromEvent.isEmpty() || + !LongitudinalTemporalEventType.isEmpty() || !ConsentForClinicalTrialUseSequence.isEmpty(); } @@ -3030,12 +3037,24 @@ OFCondition DRTImageIOD::getLastMenstrualDate(OFString &value, const signed long } +OFCondition DRTImageIOD::getLongitudinalTemporalEventType(OFString &value, const signed long pos) const +{ + return getStringValueFromElement(LongitudinalTemporalEventType, value, pos); +} + + OFCondition DRTImageIOD::getLongitudinalTemporalInformationModified(OFString &value, const signed long pos) const { return getStringValueFromElement(LongitudinalTemporalInformationModified, value, pos); } +OFCondition DRTImageIOD::getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos) const +{ + return OFconst_cast(DcmFloatingPointDouble &, LongitudinalTemporalOffsetFromEvent).getFloat64(value, pos); +} + + OFCondition DRTImageIOD::getLossyImageCompression(OFString &value, const signed long pos) const { return getStringValueFromElement(LossyImageCompression, value, pos); @@ -3162,12 +3181,6 @@ OFCondition DRTImageIOD::getOriginalSpecializedSOPClassUID(OFString &value, cons } -OFCondition DRTImageIOD::getOtherPatientIDs(OFString &value, const signed long pos) const -{ - return getStringValueFromElement(OtherPatientIDs, value, pos); -} - - OFCondition DRTImageIOD::getOtherPatientNames(OFString &value, const signed long pos) const { return getStringValueFromElement(OtherPatientNames, value, pos); @@ -4902,6 +4915,15 @@ OFCondition DRTImageIOD::setLastMenstrualDate(const OFString &value, const OFBoo } +OFCondition DRTImageIOD::setLongitudinalTemporalEventType(const OFString &value, const OFBool check) +{ + OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = LongitudinalTemporalEventType.putOFStringArray(value); + return result; +} + + OFCondition DRTImageIOD::setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; @@ -4911,6 +4933,12 @@ OFCondition DRTImageIOD::setLongitudinalTemporalInformationModified(const OFStri } +OFCondition DRTImageIOD::setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos) +{ + return LongitudinalTemporalOffsetFromEvent.putFloat64(value, pos); +} + + OFCondition DRTImageIOD::setLossyImageCompression(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; @@ -5046,15 +5074,6 @@ OFCondition DRTImageIOD::setOriginalSpecializedSOPClassUID(const OFString &value } -OFCondition DRTImageIOD::setOtherPatientIDs(const OFString &value, const OFBool check) -{ - OFCondition result = (check) ? DcmLongString::checkStringValue(value, "1-n") : EC_Normal; - if (result.good()) - result = OtherPatientIDs.putOFStringArray(value); - return result; -} - - OFCondition DRTImageIOD::setOtherPatientNames(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmPersonName::checkStringValue(value, "1-n") : EC_Normal; diff --git a/dcmrt/libsrc/drtionpl.cc b/dcmrt/libsrc/drtionpl.cc index ee456dc8..eae31b95 100644 --- a/dcmrt/libsrc/drtionpl.cc +++ b/dcmrt/libsrc/drtionpl.cc @@ -6,9 +6,8 @@ * * Source file for class DRTIonPlanIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 - * Last modified on 2017-06-15 by Riesmeier + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -32,7 +31,6 @@ DRTIonPlanIOD::DRTIonPlanIOD() QualityControlSubject(DCM_QualityControlSubject), ReferencedPatientSequence(), PatientBirthTime(DCM_PatientBirthTime), - OtherPatientIDs(DCM_RETIRED_OtherPatientIDs), OtherPatientIDsSequence(), OtherPatientNames(DCM_OtherPatientNames), EthnicGroup(DCM_EthnicGroup), @@ -109,6 +107,8 @@ DRTIonPlanIOD::DRTIonPlanIOD() PatientSexNeutered(DCM_PatientSexNeutered), ClinicalTrialTimePointID(DCM_ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(DCM_ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(DCM_LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(DCM_LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(), Modality(DCM_Modality), SeriesInstanceUID(DCM_SeriesInstanceUID), @@ -228,7 +228,6 @@ DRTIonPlanIOD::DRTIonPlanIOD(const DRTIonPlanIOD ©) QualityControlSubject(copy.QualityControlSubject), ReferencedPatientSequence(copy.ReferencedPatientSequence), PatientBirthTime(copy.PatientBirthTime), - OtherPatientIDs(copy.OtherPatientIDs), OtherPatientIDsSequence(copy.OtherPatientIDsSequence), OtherPatientNames(copy.OtherPatientNames), EthnicGroup(copy.EthnicGroup), @@ -305,6 +304,8 @@ DRTIonPlanIOD::DRTIonPlanIOD(const DRTIonPlanIOD ©) PatientSexNeutered(copy.PatientSexNeutered), ClinicalTrialTimePointID(copy.ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(copy.ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(copy.LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(copy.LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(copy.ConsentForClinicalTrialUseSequence), Modality(copy.Modality), SeriesInstanceUID(copy.SeriesInstanceUID), @@ -430,7 +431,6 @@ DRTIonPlanIOD &DRTIonPlanIOD::operator=(const DRTIonPlanIOD ©) QualityControlSubject = copy.QualityControlSubject; ReferencedPatientSequence = copy.ReferencedPatientSequence; PatientBirthTime = copy.PatientBirthTime; - OtherPatientIDs = copy.OtherPatientIDs; OtherPatientIDsSequence = copy.OtherPatientIDsSequence; OtherPatientNames = copy.OtherPatientNames; EthnicGroup = copy.EthnicGroup; @@ -507,6 +507,8 @@ DRTIonPlanIOD &DRTIonPlanIOD::operator=(const DRTIonPlanIOD ©) PatientSexNeutered = copy.PatientSexNeutered; ClinicalTrialTimePointID = copy.ClinicalTrialTimePointID; ClinicalTrialTimePointDescription = copy.ClinicalTrialTimePointDescription; + LongitudinalTemporalOffsetFromEvent = copy.LongitudinalTemporalOffsetFromEvent; + LongitudinalTemporalEventType = copy.LongitudinalTemporalEventType; ConsentForClinicalTrialUseSequence = copy.ConsentForClinicalTrialUseSequence; Modality = copy.Modality; SeriesInstanceUID = copy.SeriesInstanceUID; @@ -627,7 +629,6 @@ void DRTIonPlanIOD::clear() QualityControlSubject.clear(); ReferencedPatientSequence.clear(); PatientBirthTime.clear(); - OtherPatientIDs.clear(); OtherPatientIDsSequence.clear(); OtherPatientNames.clear(); EthnicGroup.clear(); @@ -704,6 +705,8 @@ void DRTIonPlanIOD::clear() PatientSexNeutered.clear(); ClinicalTrialTimePointID.clear(); ClinicalTrialTimePointDescription.clear(); + LongitudinalTemporalOffsetFromEvent.clear(); + LongitudinalTemporalEventType.clear(); ConsentForClinicalTrialUseSequence.clear(); Modality.clear(); SeriesInstanceUID.clear(); @@ -988,7 +991,6 @@ OFCondition DRTIonPlanIOD::readPatientData(DcmItem &dataset) getAndCheckElementFromDataset(dataset, QualityControlSubject, "1", "3", "PatientModule"); ReferencedPatientSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, PatientBirthTime, "1", "3", "PatientModule"); - getAndCheckElementFromDataset(dataset, OtherPatientIDs, "1-n", "3", "PatientModule"); OtherPatientIDsSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, OtherPatientNames, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, EthnicGroup, "1", "3", "PatientModule"); @@ -1091,6 +1093,8 @@ OFCondition DRTIonPlanIOD::readStudyData(DcmItem &dataset) { getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointID, "1", "2", "ClinicalTrialStudyModule"); getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointDescription, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalOffsetFromEvent, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalEventType, "1", "1C", "ClinicalTrialStudyModule"); ConsentForClinicalTrialUseSequence.read(dataset, "1-n", "3", "ClinicalTrialStudyModule"); } } @@ -1160,7 +1164,6 @@ OFCondition DRTIonPlanIOD::write(DcmItem &dataset) addElementToDataset(result, dataset, new DcmCodeString(QualityControlSubject), "1", "3", "PatientModule"); if (result.good()) result = ReferencedPatientSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmTime(PatientBirthTime), "1", "3", "PatientModule"); - addElementToDataset(result, dataset, new DcmLongString(OtherPatientIDs), "1-n", "3", "PatientModule"); if (result.good()) result = OtherPatientIDsSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmPersonName(OtherPatientNames), "1-n", "3", "PatientModule"); addElementToDataset(result, dataset, new DcmShortString(EthnicGroup), "1", "3", "PatientModule"); @@ -1253,6 +1256,8 @@ OFCondition DRTIonPlanIOD::write(DcmItem &dataset) { addElementToDataset(result, dataset, new DcmLongString(ClinicalTrialTimePointID), "1", "2", "ClinicalTrialStudyModule"); addElementToDataset(result, dataset, new DcmShortText(ClinicalTrialTimePointDescription), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmFloatingPointDouble(LongitudinalTemporalOffsetFromEvent), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmCodeString(LongitudinalTemporalEventType), "1", "1C", "ClinicalTrialStudyModule"); if (result.good()) result = ConsentForClinicalTrialUseSequence.write(dataset, "1-n" ,"3", "ClinicalTrialStudyModule"); } @@ -1471,6 +1476,8 @@ OFBool DRTIonPlanIOD::isClinicalTrialStudyModulePresent(const OFBool /*complete* /* check whether at least one attribute is present */ return !ClinicalTrialTimePointID.isEmpty() || !ClinicalTrialTimePointDescription.isEmpty() || + !LongitudinalTemporalOffsetFromEvent.isEmpty() || + !LongitudinalTemporalEventType.isEmpty() || !ConsentForClinicalTrialUseSequence.isEmpty(); } @@ -1814,12 +1821,24 @@ OFCondition DRTIonPlanIOD::getLastMenstrualDate(OFString &value, const signed lo } +OFCondition DRTIonPlanIOD::getLongitudinalTemporalEventType(OFString &value, const signed long pos) const +{ + return getStringValueFromElement(LongitudinalTemporalEventType, value, pos); +} + + OFCondition DRTIonPlanIOD::getLongitudinalTemporalInformationModified(OFString &value, const signed long pos) const { return getStringValueFromElement(LongitudinalTemporalInformationModified, value, pos); } +OFCondition DRTIonPlanIOD::getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos) const +{ + return OFconst_cast(DcmFloatingPointDouble &, LongitudinalTemporalOffsetFromEvent).getFloat64(value, pos); +} + + OFCondition DRTIonPlanIOD::getManufacturer(OFString &value, const signed long pos) const { return getStringValueFromElement(Manufacturer, value, pos); @@ -1892,12 +1911,6 @@ OFCondition DRTIonPlanIOD::getOriginalSpecializedSOPClassUID(OFString &value, co } -OFCondition DRTIonPlanIOD::getOtherPatientIDs(OFString &value, const signed long pos) const -{ - return getStringValueFromElement(OtherPatientIDs, value, pos); -} - - OFCondition DRTIonPlanIOD::getOtherPatientNames(OFString &value, const signed long pos) const { return getStringValueFromElement(OtherPatientNames, value, pos); @@ -2759,6 +2772,15 @@ OFCondition DRTIonPlanIOD::setLastMenstrualDate(const OFString &value, const OFB } +OFCondition DRTIonPlanIOD::setLongitudinalTemporalEventType(const OFString &value, const OFBool check) +{ + OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = LongitudinalTemporalEventType.putOFStringArray(value); + return result; +} + + OFCondition DRTIonPlanIOD::setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; @@ -2768,6 +2790,12 @@ OFCondition DRTIonPlanIOD::setLongitudinalTemporalInformationModified(const OFSt } +OFCondition DRTIonPlanIOD::setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos) +{ + return LongitudinalTemporalOffsetFromEvent.putFloat64(value, pos); +} + + OFCondition DRTIonPlanIOD::setManufacturer(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmLongString::checkStringValue(value, "1") : EC_Normal; @@ -2858,15 +2886,6 @@ OFCondition DRTIonPlanIOD::setOriginalSpecializedSOPClassUID(const OFString &val } -OFCondition DRTIonPlanIOD::setOtherPatientIDs(const OFString &value, const OFBool check) -{ - OFCondition result = (check) ? DcmLongString::checkStringValue(value, "1-n") : EC_Normal; - if (result.good()) - result = OtherPatientIDs.putOFStringArray(value); - return result; -} - - OFCondition DRTIonPlanIOD::setOtherPatientNames(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmPersonName::checkStringValue(value, "1-n") : EC_Normal; diff --git a/dcmrt/libsrc/drtiontr.cc b/dcmrt/libsrc/drtiontr.cc index fd1a52a0..3b313ddb 100644 --- a/dcmrt/libsrc/drtiontr.cc +++ b/dcmrt/libsrc/drtiontr.cc @@ -6,9 +6,8 @@ * * Source file for class DRTIonBeamsTreatmentRecordIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 - * Last modified on 2017-06-15 by Riesmeier + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -32,7 +31,6 @@ DRTIonBeamsTreatmentRecordIOD::DRTIonBeamsTreatmentRecordIOD() QualityControlSubject(DCM_QualityControlSubject), ReferencedPatientSequence(), PatientBirthTime(DCM_PatientBirthTime), - OtherPatientIDs(DCM_RETIRED_OtherPatientIDs), OtherPatientIDsSequence(), OtherPatientNames(DCM_OtherPatientNames), EthnicGroup(DCM_EthnicGroup), @@ -86,6 +84,8 @@ DRTIonBeamsTreatmentRecordIOD::DRTIonBeamsTreatmentRecordIOD() ReasonForPerformedProcedureCodeSequence(), ClinicalTrialTimePointID(DCM_ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(DCM_ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(DCM_LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(DCM_LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(), AdmittingDiagnosesDescription(DCM_AdmittingDiagnosesDescription), AdmittingDiagnosesCodeSequence(), @@ -222,7 +222,6 @@ DRTIonBeamsTreatmentRecordIOD::DRTIonBeamsTreatmentRecordIOD(const DRTIonBeamsTr QualityControlSubject(copy.QualityControlSubject), ReferencedPatientSequence(copy.ReferencedPatientSequence), PatientBirthTime(copy.PatientBirthTime), - OtherPatientIDs(copy.OtherPatientIDs), OtherPatientIDsSequence(copy.OtherPatientIDsSequence), OtherPatientNames(copy.OtherPatientNames), EthnicGroup(copy.EthnicGroup), @@ -276,6 +275,8 @@ DRTIonBeamsTreatmentRecordIOD::DRTIonBeamsTreatmentRecordIOD(const DRTIonBeamsTr ReasonForPerformedProcedureCodeSequence(copy.ReasonForPerformedProcedureCodeSequence), ClinicalTrialTimePointID(copy.ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(copy.ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(copy.LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(copy.LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(copy.ConsentForClinicalTrialUseSequence), AdmittingDiagnosesDescription(copy.AdmittingDiagnosesDescription), AdmittingDiagnosesCodeSequence(copy.AdmittingDiagnosesCodeSequence), @@ -418,7 +419,6 @@ DRTIonBeamsTreatmentRecordIOD &DRTIonBeamsTreatmentRecordIOD::operator=(const DR QualityControlSubject = copy.QualityControlSubject; ReferencedPatientSequence = copy.ReferencedPatientSequence; PatientBirthTime = copy.PatientBirthTime; - OtherPatientIDs = copy.OtherPatientIDs; OtherPatientIDsSequence = copy.OtherPatientIDsSequence; OtherPatientNames = copy.OtherPatientNames; EthnicGroup = copy.EthnicGroup; @@ -472,6 +472,8 @@ DRTIonBeamsTreatmentRecordIOD &DRTIonBeamsTreatmentRecordIOD::operator=(const DR ReasonForPerformedProcedureCodeSequence = copy.ReasonForPerformedProcedureCodeSequence; ClinicalTrialTimePointID = copy.ClinicalTrialTimePointID; ClinicalTrialTimePointDescription = copy.ClinicalTrialTimePointDescription; + LongitudinalTemporalOffsetFromEvent = copy.LongitudinalTemporalOffsetFromEvent; + LongitudinalTemporalEventType = copy.LongitudinalTemporalEventType; ConsentForClinicalTrialUseSequence = copy.ConsentForClinicalTrialUseSequence; AdmittingDiagnosesDescription = copy.AdmittingDiagnosesDescription; AdmittingDiagnosesCodeSequence = copy.AdmittingDiagnosesCodeSequence; @@ -609,7 +611,6 @@ void DRTIonBeamsTreatmentRecordIOD::clear() QualityControlSubject.clear(); ReferencedPatientSequence.clear(); PatientBirthTime.clear(); - OtherPatientIDs.clear(); OtherPatientIDsSequence.clear(); OtherPatientNames.clear(); EthnicGroup.clear(); @@ -663,6 +664,8 @@ void DRTIonBeamsTreatmentRecordIOD::clear() ReasonForPerformedProcedureCodeSequence.clear(); ClinicalTrialTimePointID.clear(); ClinicalTrialTimePointDescription.clear(); + LongitudinalTemporalOffsetFromEvent.clear(); + LongitudinalTemporalEventType.clear(); ConsentForClinicalTrialUseSequence.clear(); AdmittingDiagnosesDescription.clear(); AdmittingDiagnosesCodeSequence.clear(); @@ -955,7 +958,6 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::readPatientData(DcmItem &dataset) getAndCheckElementFromDataset(dataset, QualityControlSubject, "1", "3", "PatientModule"); ReferencedPatientSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, PatientBirthTime, "1", "3", "PatientModule"); - getAndCheckElementFromDataset(dataset, OtherPatientIDs, "1-n", "3", "PatientModule"); OtherPatientIDsSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, OtherPatientNames, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, EthnicGroup, "1", "3", "PatientModule"); @@ -1033,6 +1035,8 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::readStudyData(DcmItem &dataset) { getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointID, "1", "2", "ClinicalTrialStudyModule"); getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointDescription, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalOffsetFromEvent, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalEventType, "1", "1C", "ClinicalTrialStudyModule"); ConsentForClinicalTrialUseSequence.read(dataset, "1-n", "3", "ClinicalTrialStudyModule"); } @@ -1127,7 +1131,6 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::write(DcmItem &dataset) addElementToDataset(result, dataset, new DcmCodeString(QualityControlSubject), "1", "3", "PatientModule"); if (result.good()) result = ReferencedPatientSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmTime(PatientBirthTime), "1", "3", "PatientModule"); - addElementToDataset(result, dataset, new DcmLongString(OtherPatientIDs), "1-n", "3", "PatientModule"); if (result.good()) result = OtherPatientIDsSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmPersonName(OtherPatientNames), "1-n", "3", "PatientModule"); addElementToDataset(result, dataset, new DcmShortString(EthnicGroup), "1", "3", "PatientModule"); @@ -1192,6 +1195,8 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::write(DcmItem &dataset) { addElementToDataset(result, dataset, new DcmLongString(ClinicalTrialTimePointID), "1", "2", "ClinicalTrialStudyModule"); addElementToDataset(result, dataset, new DcmShortText(ClinicalTrialTimePointDescription), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmFloatingPointDouble(LongitudinalTemporalOffsetFromEvent), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmCodeString(LongitudinalTemporalEventType), "1", "1C", "ClinicalTrialStudyModule"); if (result.good()) result = ConsentForClinicalTrialUseSequence.write(dataset, "1-n" ,"3", "ClinicalTrialStudyModule"); } @@ -1395,6 +1400,8 @@ OFBool DRTIonBeamsTreatmentRecordIOD::isClinicalTrialStudyModulePresent(const OF /* check whether at least one attribute is present */ return !ClinicalTrialTimePointID.isEmpty() || !ClinicalTrialTimePointDescription.isEmpty() || + !LongitudinalTemporalOffsetFromEvent.isEmpty() || + !LongitudinalTemporalEventType.isEmpty() || !ConsentForClinicalTrialUseSequence.isEmpty(); } @@ -1749,12 +1756,24 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::getLastMenstrualDate(OFString &value, } +OFCondition DRTIonBeamsTreatmentRecordIOD::getLongitudinalTemporalEventType(OFString &value, const signed long pos) const +{ + return getStringValueFromElement(LongitudinalTemporalEventType, value, pos); +} + + OFCondition DRTIonBeamsTreatmentRecordIOD::getLongitudinalTemporalInformationModified(OFString &value, const signed long pos) const { return getStringValueFromElement(LongitudinalTemporalInformationModified, value, pos); } +OFCondition DRTIonBeamsTreatmentRecordIOD::getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos) const +{ + return OFconst_cast(DcmFloatingPointDouble &, LongitudinalTemporalOffsetFromEvent).getFloat64(value, pos); +} + + OFCondition DRTIonBeamsTreatmentRecordIOD::getManufacturer(OFString &value, const signed long pos) const { return getStringValueFromElement(Manufacturer, value, pos); @@ -1845,12 +1864,6 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::getOriginalSpecializedSOPClassUID(OFS } -OFCondition DRTIonBeamsTreatmentRecordIOD::getOtherPatientIDs(OFString &value, const signed long pos) const -{ - return getStringValueFromElement(OtherPatientIDs, value, pos); -} - - OFCondition DRTIonBeamsTreatmentRecordIOD::getOtherPatientNames(OFString &value, const signed long pos) const { return getStringValueFromElement(OtherPatientNames, value, pos); @@ -2658,6 +2671,15 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::setLastMenstrualDate(const OFString & } +OFCondition DRTIonBeamsTreatmentRecordIOD::setLongitudinalTemporalEventType(const OFString &value, const OFBool check) +{ + OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = LongitudinalTemporalEventType.putOFStringArray(value); + return result; +} + + OFCondition DRTIonBeamsTreatmentRecordIOD::setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; @@ -2667,6 +2689,12 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::setLongitudinalTemporalInformationMod } +OFCondition DRTIonBeamsTreatmentRecordIOD::setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos) +{ + return LongitudinalTemporalOffsetFromEvent.putFloat64(value, pos); +} + + OFCondition DRTIonBeamsTreatmentRecordIOD::setManufacturer(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmLongString::checkStringValue(value, "1") : EC_Normal; @@ -2775,15 +2803,6 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::setOriginalSpecializedSOPClassUID(con } -OFCondition DRTIonBeamsTreatmentRecordIOD::setOtherPatientIDs(const OFString &value, const OFBool check) -{ - OFCondition result = (check) ? DcmLongString::checkStringValue(value, "1-n") : EC_Normal; - if (result.good()) - result = OtherPatientIDs.putOFStringArray(value); - return result; -} - - OFCondition DRTIonBeamsTreatmentRecordIOD::setOtherPatientNames(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmPersonName::checkStringValue(value, "1-n") : EC_Normal; diff --git a/dcmrt/libsrc/drtipiqs.cc b/dcmrt/libsrc/drtipiqs.cc index bb27b5f6..191c864b 100644 --- a/dcmrt/libsrc/drtipiqs.cc +++ b/dcmrt/libsrc/drtipiqs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIssuerOfPatientIDQualifiersSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtircs.cc b/dcmrt/libsrc/drtircs.cc index 3e5d7c69..56bf8a91 100644 --- a/dcmrt/libsrc/drtircs.cc +++ b/dcmrt/libsrc/drtircs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonRangeCompensatorSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtiseis.cc b/dcmrt/libsrc/drtiseis.cc index 9374742a..29fc8815 100644 --- a/dcmrt/libsrc/drtiseis.cc +++ b/dcmrt/libsrc/drtiseis.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIssuerOfServiceEpisodeIDSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtitts.cc b/dcmrt/libsrc/drtitts.cc index 9adca052..9f6f1f2d 100644 --- a/dcmrt/libsrc/drtitts.cc +++ b/dcmrt/libsrc/drtitts.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonToleranceTableSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtiwps.cc b/dcmrt/libsrc/drtiwps.cc index 9dfc6319..c043d21c 100644 --- a/dcmrt/libsrc/drtiwps.cc +++ b/dcmrt/libsrc/drtiwps.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonWedgePositionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtiws.cc b/dcmrt/libsrc/drtiws.cc index b0e16b93..488532d5 100644 --- a/dcmrt/libsrc/drtiws.cc +++ b/dcmrt/libsrc/drtiws.cc @@ -6,8 +6,8 @@ * * Source file for class DRTIonWedgeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtlsds.cc b/dcmrt/libsrc/drtlsds.cc index 0d55d8c6..ccbe1f56 100644 --- a/dcmrt/libsrc/drtlsds.cc +++ b/dcmrt/libsrc/drtlsds.cc @@ -6,8 +6,8 @@ * * Source file for class DRTLateralSpreadingDeviceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtlsds6.cc b/dcmrt/libsrc/drtlsds6.cc index 071077ee..1003c816 100644 --- a/dcmrt/libsrc/drtlsds6.cc +++ b/dcmrt/libsrc/drtlsds6.cc @@ -6,8 +6,8 @@ * * Source file for class DRTLateralSpreadingDeviceSettingsSequenceInRTIonBeamsModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtlsds7.cc b/dcmrt/libsrc/drtlsds7.cc index 11d9f268..a008d3c0 100644 --- a/dcmrt/libsrc/drtlsds7.cc +++ b/dcmrt/libsrc/drtlsds7.cc @@ -6,8 +6,8 @@ * * Source file for class DRTLateralSpreadingDeviceSettingsSequenceInRTIonBeamsSessionRecordModule * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtmacds.cc b/dcmrt/libsrc/drtmacds.cc index 9bbd4f8b..7e2481ca 100644 --- a/dcmrt/libsrc/drtmacds.cc +++ b/dcmrt/libsrc/drtmacds.cc @@ -6,8 +6,8 @@ * * Source file for class DRTMultiplexedAudioChannelsDescriptionCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtmas.cc b/dcmrt/libsrc/drtmas.cc index ea934ac8..001eba23 100644 --- a/dcmrt/libsrc/drtmas.cc +++ b/dcmrt/libsrc/drtmas.cc @@ -6,8 +6,8 @@ * * Source file for class DRTModifiedAttributesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtmdrs.cc b/dcmrt/libsrc/drtmdrs.cc index 93aa8a50..931c0022 100644 --- a/dcmrt/libsrc/drtmdrs.cc +++ b/dcmrt/libsrc/drtmdrs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTMeasuredDoseReferenceSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtmls.cc b/dcmrt/libsrc/drtmls.cc index c90d4d38..81856075 100644 --- a/dcmrt/libsrc/drtmls.cc +++ b/dcmrt/libsrc/drtmls.cc @@ -6,8 +6,8 @@ * * Source file for class DRTModalityLUTSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtmps.cc b/dcmrt/libsrc/drtmps.cc index a1cb4a00..b9d4dc39 100644 --- a/dcmrt/libsrc/drtmps.cc +++ b/dcmrt/libsrc/drtmps.cc @@ -6,8 +6,8 @@ * * Source file for class DRTMACParametersSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtmris.cc b/dcmrt/libsrc/drtmris.cc index ebd9dcc5..731eb7a4 100644 --- a/dcmrt/libsrc/drtmris.cc +++ b/dcmrt/libsrc/drtmris.cc @@ -6,8 +6,8 @@ * * Source file for class DRTMappingResourceIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtmss.cc b/dcmrt/libsrc/drtmss.cc index efb35376..10b18c7e 100644 --- a/dcmrt/libsrc/drtmss.cc +++ b/dcmrt/libsrc/drtmss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTMotionSynchronizationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtmucs.cc b/dcmrt/libsrc/drtmucs.cc index d8f109fe..d3e1f6ba 100644 --- a/dcmrt/libsrc/drtmucs.cc +++ b/dcmrt/libsrc/drtmucs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTMeasurementUnitsCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtoas.cc b/dcmrt/libsrc/drtoas.cc index 18ae0e41..5260165e 100644 --- a/dcmrt/libsrc/drtoas.cc +++ b/dcmrt/libsrc/drtoas.cc @@ -6,8 +6,8 @@ * * Source file for class DRTOriginalAttributesSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtois.cc b/dcmrt/libsrc/drtois.cc index 8beabf00..5b543397 100644 --- a/dcmrt/libsrc/drtois.cc +++ b/dcmrt/libsrc/drtois.cc @@ -6,8 +6,8 @@ * * Source file for class DRTOperatorIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtopis.cc b/dcmrt/libsrc/drtopis.cc index d52bdd7b..7dcb7ed4 100644 --- a/dcmrt/libsrc/drtopis.cc +++ b/dcmrt/libsrc/drtopis.cc @@ -6,8 +6,8 @@ * * Source file for class DRTOtherPatientIDsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtos.cc b/dcmrt/libsrc/drtos.cc index 658dbfc1..b0fadf2b 100644 --- a/dcmrt/libsrc/drtos.cc +++ b/dcmrt/libsrc/drtos.cc @@ -6,8 +6,8 @@ * * Source file for class DRTOverrideSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpbcs.cc b/dcmrt/libsrc/drtpbcs.cc index f8c086c6..5076218c 100644 --- a/dcmrt/libsrc/drtpbcs.cc +++ b/dcmrt/libsrc/drtpbcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPatientBreedCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpcs.cc b/dcmrt/libsrc/drtpcs.cc index 63b45891..b7a3a85b 100644 --- a/dcmrt/libsrc/drtpcs.cc +++ b/dcmrt/libsrc/drtpcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTProcedureCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpcxs.cc b/dcmrt/libsrc/drtpcxs.cc index 6ec52b3d..8805176c 100644 --- a/dcmrt/libsrc/drtpcxs.cc +++ b/dcmrt/libsrc/drtpcxs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTProtocolContextSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -29,6 +29,7 @@ DRTProtocolContextSequence::Item::Item(const OFBool emptyDefaultItem) FloatingPointValue(DCM_FloatingPointValue), MeasurementUnitsCodeSequence(emptyDefaultItem /*emptyDefaultSequence*/), NumericValue(DCM_NumericValue), + ObservationDateTime(DCM_ObservationDateTime), PersonName(DCM_PersonName), RationalDenominatorValue(DCM_RationalDenominatorValue), RationalNumeratorValue(DCM_RationalNumeratorValue), @@ -51,6 +52,7 @@ DRTProtocolContextSequence::Item::Item(const Item ©) FloatingPointValue(copy.FloatingPointValue), MeasurementUnitsCodeSequence(copy.MeasurementUnitsCodeSequence), NumericValue(copy.NumericValue), + ObservationDateTime(copy.ObservationDateTime), PersonName(copy.PersonName), RationalDenominatorValue(copy.RationalDenominatorValue), RationalNumeratorValue(copy.RationalNumeratorValue), @@ -81,6 +83,7 @@ DRTProtocolContextSequence::Item &DRTProtocolContextSequence::Item::operator=(co FloatingPointValue = copy.FloatingPointValue; MeasurementUnitsCodeSequence = copy.MeasurementUnitsCodeSequence; NumericValue = copy.NumericValue; + ObservationDateTime = copy.ObservationDateTime; PersonName = copy.PersonName; RationalDenominatorValue = copy.RationalDenominatorValue; RationalNumeratorValue = copy.RationalNumeratorValue; @@ -100,6 +103,7 @@ void DRTProtocolContextSequence::Item::clear() { /* clear all DICOM attributes */ ValueType.clear(); + ObservationDateTime.clear(); ConceptNameCodeSequence.clear(); DateTime.clear(); Date.clear(); @@ -122,6 +126,7 @@ void DRTProtocolContextSequence::Item::clear() OFBool DRTProtocolContextSequence::Item::isEmpty() { return ValueType.isEmpty() && + ObservationDateTime.isEmpty() && ConceptNameCodeSequence.isEmpty() && DateTime.isEmpty() && Date.isEmpty() && @@ -154,6 +159,7 @@ OFCondition DRTProtocolContextSequence::Item::read(DcmItem &item) /* re-initialize object */ clear(); getAndCheckElementFromDataset(item, ValueType, "1", "1", "ProtocolContextSequence"); + getAndCheckElementFromDataset(item, ObservationDateTime, "1", "3", "ProtocolContextSequence"); ConceptNameCodeSequence.read(item, "1-n", "1", "ProtocolContextSequence"); getAndCheckElementFromDataset(item, DateTime, "1", "1C", "ProtocolContextSequence"); getAndCheckElementFromDataset(item, Date, "1", "1C", "ProtocolContextSequence"); @@ -182,6 +188,7 @@ OFCondition DRTProtocolContextSequence::Item::write(DcmItem &item) { result = EC_Normal; addElementToDataset(result, item, new DcmCodeString(ValueType), "1", "1", "ProtocolContextSequence"); + addElementToDataset(result, item, new DcmDateTime(ObservationDateTime), "1", "3", "ProtocolContextSequence"); if (result.good()) result = ConceptNameCodeSequence.write(item, "1-n", "1", "ProtocolContextSequence"); addElementToDataset(result, item, new DcmDateTime(DateTime), "1", "1C", "ProtocolContextSequence"); addElementToDataset(result, item, new DcmDate(Date), "1", "1C", "ProtocolContextSequence"); @@ -256,6 +263,15 @@ OFCondition DRTProtocolContextSequence::Item::getNumericValue(OFVector } +OFCondition DRTProtocolContextSequence::Item::getObservationDateTime(OFString &value, const signed long pos) const +{ + if (EmptyDefaultItem) + return EC_IllegalCall; + else + return getStringValueFromElement(ObservationDateTime, value, pos); +} + + OFCondition DRTProtocolContextSequence::Item::getPersonName(OFString &value, const signed long pos) const { if (EmptyDefaultItem) @@ -367,6 +383,19 @@ OFCondition DRTProtocolContextSequence::Item::setNumericValue(const OFString &va } +OFCondition DRTProtocolContextSequence::Item::setObservationDateTime(const OFString &value, const OFBool check) +{ + OFCondition result = EC_IllegalCall; + if (!EmptyDefaultItem) + { + result = (check) ? DcmDateTime::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = ObservationDateTime.putOFStringArray(value); + } + return result; +} + + OFCondition DRTProtocolContextSequence::Item::setPersonName(const OFString &value, const OFBool check) { OFCondition result = EC_IllegalCall; diff --git a/dcmrt/libsrc/drtpdecs.cc b/dcmrt/libsrc/drtpdecs.cc index 14bda92f..1c00ae75 100644 --- a/dcmrt/libsrc/drtpdecs.cc +++ b/dcmrt/libsrc/drtpdecs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPrivateDataElementCharacteristicsSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpdeds.cc b/dcmrt/libsrc/drtpdeds.cc index 72a00583..a99bf9e2 100644 --- a/dcmrt/libsrc/drtpdeds.cc +++ b/dcmrt/libsrc/drtpdeds.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPrivateDataElementDefinitionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpfms.cc b/dcmrt/libsrc/drtpfms.cc index c5887aac..1a630558 100644 --- a/dcmrt/libsrc/drtpfms.cc +++ b/dcmrt/libsrc/drtpfms.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPrimaryFluenceModeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpics.cc b/dcmrt/libsrc/drtpics.cc index 2bcf18d6..9ececd0b 100644 --- a/dcmrt/libsrc/drtpics.cc +++ b/dcmrt/libsrc/drtpics.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPersonIdentificationCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtplan.cc b/dcmrt/libsrc/drtplan.cc index 2805292a..b147317a 100644 --- a/dcmrt/libsrc/drtplan.cc +++ b/dcmrt/libsrc/drtplan.cc @@ -6,9 +6,8 @@ * * Source file for class DRTPlanIOD * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 - * Last modified on 2017-06-15 by Riesmeier + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -32,7 +31,6 @@ DRTPlanIOD::DRTPlanIOD() QualityControlSubject(DCM_QualityControlSubject), ReferencedPatientSequence(), PatientBirthTime(DCM_PatientBirthTime), - OtherPatientIDs(DCM_RETIRED_OtherPatientIDs), OtherPatientIDsSequence(), OtherPatientNames(DCM_OtherPatientNames), EthnicGroup(DCM_EthnicGroup), @@ -109,6 +107,8 @@ DRTPlanIOD::DRTPlanIOD() PatientSexNeutered(DCM_PatientSexNeutered), ClinicalTrialTimePointID(DCM_ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(DCM_ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(DCM_LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(DCM_LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(), Modality(DCM_Modality), SeriesInstanceUID(DCM_SeriesInstanceUID), @@ -233,7 +233,6 @@ DRTPlanIOD::DRTPlanIOD(const DRTPlanIOD ©) QualityControlSubject(copy.QualityControlSubject), ReferencedPatientSequence(copy.ReferencedPatientSequence), PatientBirthTime(copy.PatientBirthTime), - OtherPatientIDs(copy.OtherPatientIDs), OtherPatientIDsSequence(copy.OtherPatientIDsSequence), OtherPatientNames(copy.OtherPatientNames), EthnicGroup(copy.EthnicGroup), @@ -310,6 +309,8 @@ DRTPlanIOD::DRTPlanIOD(const DRTPlanIOD ©) PatientSexNeutered(copy.PatientSexNeutered), ClinicalTrialTimePointID(copy.ClinicalTrialTimePointID), ClinicalTrialTimePointDescription(copy.ClinicalTrialTimePointDescription), + LongitudinalTemporalOffsetFromEvent(copy.LongitudinalTemporalOffsetFromEvent), + LongitudinalTemporalEventType(copy.LongitudinalTemporalEventType), ConsentForClinicalTrialUseSequence(copy.ConsentForClinicalTrialUseSequence), Modality(copy.Modality), SeriesInstanceUID(copy.SeriesInstanceUID), @@ -440,7 +441,6 @@ DRTPlanIOD &DRTPlanIOD::operator=(const DRTPlanIOD ©) QualityControlSubject = copy.QualityControlSubject; ReferencedPatientSequence = copy.ReferencedPatientSequence; PatientBirthTime = copy.PatientBirthTime; - OtherPatientIDs = copy.OtherPatientIDs; OtherPatientIDsSequence = copy.OtherPatientIDsSequence; OtherPatientNames = copy.OtherPatientNames; EthnicGroup = copy.EthnicGroup; @@ -517,6 +517,8 @@ DRTPlanIOD &DRTPlanIOD::operator=(const DRTPlanIOD ©) PatientSexNeutered = copy.PatientSexNeutered; ClinicalTrialTimePointID = copy.ClinicalTrialTimePointID; ClinicalTrialTimePointDescription = copy.ClinicalTrialTimePointDescription; + LongitudinalTemporalOffsetFromEvent = copy.LongitudinalTemporalOffsetFromEvent; + LongitudinalTemporalEventType = copy.LongitudinalTemporalEventType; ConsentForClinicalTrialUseSequence = copy.ConsentForClinicalTrialUseSequence; Modality = copy.Modality; SeriesInstanceUID = copy.SeriesInstanceUID; @@ -642,7 +644,6 @@ void DRTPlanIOD::clear() QualityControlSubject.clear(); ReferencedPatientSequence.clear(); PatientBirthTime.clear(); - OtherPatientIDs.clear(); OtherPatientIDsSequence.clear(); OtherPatientNames.clear(); EthnicGroup.clear(); @@ -719,6 +720,8 @@ void DRTPlanIOD::clear() PatientSexNeutered.clear(); ClinicalTrialTimePointID.clear(); ClinicalTrialTimePointDescription.clear(); + LongitudinalTemporalOffsetFromEvent.clear(); + LongitudinalTemporalEventType.clear(); ConsentForClinicalTrialUseSequence.clear(); Modality.clear(); SeriesInstanceUID.clear(); @@ -1023,7 +1026,6 @@ OFCondition DRTPlanIOD::readPatientData(DcmItem &dataset) getAndCheckElementFromDataset(dataset, QualityControlSubject, "1", "3", "PatientModule"); ReferencedPatientSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, PatientBirthTime, "1", "3", "PatientModule"); - getAndCheckElementFromDataset(dataset, OtherPatientIDs, "1-n", "3", "PatientModule"); OtherPatientIDsSequence.read(dataset, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, OtherPatientNames, "1-n", "3", "PatientModule"); getAndCheckElementFromDataset(dataset, EthnicGroup, "1", "3", "PatientModule"); @@ -1126,6 +1128,8 @@ OFCondition DRTPlanIOD::readStudyData(DcmItem &dataset) { getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointID, "1", "2", "ClinicalTrialStudyModule"); getAndCheckElementFromDataset(dataset, ClinicalTrialTimePointDescription, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalOffsetFromEvent, "1", "3", "ClinicalTrialStudyModule"); + getAndCheckElementFromDataset(dataset, LongitudinalTemporalEventType, "1", "1C", "ClinicalTrialStudyModule"); ConsentForClinicalTrialUseSequence.read(dataset, "1-n", "3", "ClinicalTrialStudyModule"); } } @@ -1195,7 +1199,6 @@ OFCondition DRTPlanIOD::write(DcmItem &dataset) addElementToDataset(result, dataset, new DcmCodeString(QualityControlSubject), "1", "3", "PatientModule"); if (result.good()) result = ReferencedPatientSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmTime(PatientBirthTime), "1", "3", "PatientModule"); - addElementToDataset(result, dataset, new DcmLongString(OtherPatientIDs), "1-n", "3", "PatientModule"); if (result.good()) result = OtherPatientIDsSequence.write(dataset, "1-n" ,"3", "PatientModule"); addElementToDataset(result, dataset, new DcmPersonName(OtherPatientNames), "1-n", "3", "PatientModule"); addElementToDataset(result, dataset, new DcmShortString(EthnicGroup), "1", "3", "PatientModule"); @@ -1288,6 +1291,8 @@ OFCondition DRTPlanIOD::write(DcmItem &dataset) { addElementToDataset(result, dataset, new DcmLongString(ClinicalTrialTimePointID), "1", "2", "ClinicalTrialStudyModule"); addElementToDataset(result, dataset, new DcmShortText(ClinicalTrialTimePointDescription), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmFloatingPointDouble(LongitudinalTemporalOffsetFromEvent), "1", "3", "ClinicalTrialStudyModule"); + addElementToDataset(result, dataset, new DcmCodeString(LongitudinalTemporalEventType), "1", "1C", "ClinicalTrialStudyModule"); if (result.good()) result = ConsentForClinicalTrialUseSequence.write(dataset, "1-n" ,"3", "ClinicalTrialStudyModule"); } @@ -1519,6 +1524,8 @@ OFBool DRTPlanIOD::isClinicalTrialStudyModulePresent(const OFBool /*complete*/) /* check whether at least one attribute is present */ return !ClinicalTrialTimePointID.isEmpty() || !ClinicalTrialTimePointDescription.isEmpty() || + !LongitudinalTemporalOffsetFromEvent.isEmpty() || + !LongitudinalTemporalEventType.isEmpty() || !ConsentForClinicalTrialUseSequence.isEmpty(); } @@ -1909,12 +1916,24 @@ OFCondition DRTPlanIOD::getLastMenstrualDate(OFString &value, const signed long } +OFCondition DRTPlanIOD::getLongitudinalTemporalEventType(OFString &value, const signed long pos) const +{ + return getStringValueFromElement(LongitudinalTemporalEventType, value, pos); +} + + OFCondition DRTPlanIOD::getLongitudinalTemporalInformationModified(OFString &value, const signed long pos) const { return getStringValueFromElement(LongitudinalTemporalInformationModified, value, pos); } +OFCondition DRTPlanIOD::getLongitudinalTemporalOffsetFromEvent(Float64 &value, const unsigned long pos) const +{ + return OFconst_cast(DcmFloatingPointDouble &, LongitudinalTemporalOffsetFromEvent).getFloat64(value, pos); +} + + OFCondition DRTPlanIOD::getManufacturer(OFString &value, const signed long pos) const { return getStringValueFromElement(Manufacturer, value, pos); @@ -1987,12 +2006,6 @@ OFCondition DRTPlanIOD::getOriginalSpecializedSOPClassUID(OFString &value, const } -OFCondition DRTPlanIOD::getOtherPatientIDs(OFString &value, const signed long pos) const -{ - return getStringValueFromElement(OtherPatientIDs, value, pos); -} - - OFCondition DRTPlanIOD::getOtherPatientNames(OFString &value, const signed long pos) const { return getStringValueFromElement(OtherPatientNames, value, pos); @@ -2872,6 +2885,15 @@ OFCondition DRTPlanIOD::setLastMenstrualDate(const OFString &value, const OFBool } +OFCondition DRTPlanIOD::setLongitudinalTemporalEventType(const OFString &value, const OFBool check) +{ + OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = LongitudinalTemporalEventType.putOFStringArray(value); + return result; +} + + OFCondition DRTPlanIOD::setLongitudinalTemporalInformationModified(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; @@ -2881,6 +2903,12 @@ OFCondition DRTPlanIOD::setLongitudinalTemporalInformationModified(const OFStrin } +OFCondition DRTPlanIOD::setLongitudinalTemporalOffsetFromEvent(const Float64 value, const unsigned long pos) +{ + return LongitudinalTemporalOffsetFromEvent.putFloat64(value, pos); +} + + OFCondition DRTPlanIOD::setManufacturer(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmLongString::checkStringValue(value, "1") : EC_Normal; @@ -2971,15 +2999,6 @@ OFCondition DRTPlanIOD::setOriginalSpecializedSOPClassUID(const OFString &value, } -OFCondition DRTPlanIOD::setOtherPatientIDs(const OFString &value, const OFBool check) -{ - OFCondition result = (check) ? DcmLongString::checkStringValue(value, "1-n") : EC_Normal; - if (result.good()) - result = OtherPatientIDs.putOFStringArray(value); - return result; -} - - OFCondition DRTPlanIOD::setOtherPatientNames(const OFString &value, const OFBool check) { OFCondition result = (check) ? DcmPersonName::checkStringValue(value, "1-n") : EC_Normal; diff --git a/dcmrt/libsrc/drtporcs.cc b/dcmrt/libsrc/drtporcs.cc index 73f0c0f2..0e8ae045 100644 --- a/dcmrt/libsrc/drtporcs.cc +++ b/dcmrt/libsrc/drtporcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPurposeOfReferenceCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtporis.cc b/dcmrt/libsrc/drtporis.cc index 42047f74..55294207 100644 --- a/dcmrt/libsrc/drtporis.cc +++ b/dcmrt/libsrc/drtporis.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPhysiciansOfRecordIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtppcs.cc b/dcmrt/libsrc/drtppcs.cc index dde2777b..eca35b64 100644 --- a/dcmrt/libsrc/drtppcs.cc +++ b/dcmrt/libsrc/drtppcs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPerformedProtocolCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtprsis.cc b/dcmrt/libsrc/drtprsis.cc index 80563732..f6063721 100644 --- a/dcmrt/libsrc/drtprsis.cc +++ b/dcmrt/libsrc/drtprsis.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPhysiciansReadingStudyIdentificationSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpscs.cc b/dcmrt/libsrc/drtpscs.cc index 4a086ed4..e0c6e875 100644 --- a/dcmrt/libsrc/drtpscs.cc +++ b/dcmrt/libsrc/drtpscs.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPatientSpeciesCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpsics.cc b/dcmrt/libsrc/drtpsics.cc index 06898d40..4632ec95 100644 --- a/dcmrt/libsrc/drtpsics.cc +++ b/dcmrt/libsrc/drtpsics.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPatientSizeCodeSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpss.cc b/dcmrt/libsrc/drtpss.cc index 64d8d8ae..e6ce1bda 100644 --- a/dcmrt/libsrc/drtpss.cc +++ b/dcmrt/libsrc/drtpss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPatientSetupSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpsss.cc b/dcmrt/libsrc/drtpsss.cc index bfd9e7d0..7933cda4 100644 --- a/dcmrt/libsrc/drtpsss.cc +++ b/dcmrt/libsrc/drtpsss.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPredecessorStructureSetSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtpvis.cc b/dcmrt/libsrc/drtpvis.cc index 70d4ac74..90b2bade 100644 --- a/dcmrt/libsrc/drtpvis.cc +++ b/dcmrt/libsrc/drtpvis.cc @@ -6,8 +6,8 @@ * * Source file for class DRTPlannedVerificationImageSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ diff --git a/dcmrt/libsrc/drtqds.cc b/dcmrt/libsrc/drtqds.cc index 9a66fa0d..2d6994bb 100644 --- a/dcmrt/libsrc/drtqds.cc +++ b/dcmrt/libsrc/drtqds.cc @@ -6,8 +6,8 @@ * * Source file for class DRTQuantityDefinitionSequence * - * Generated automatically from DICOM PS 3.3-2017a - * File created on 2017-03-13 11:22:36 + * Generated automatically from DICOM PS 3.3-2017e + * File created on 2017-12-05 09:30:54 * */ @@ -28,6 +28,7 @@ DRTQuantityDefinitionSequence::Item::Item(const OFBool emptyDefaultItem) FloatingPointValue(DCM_FloatingPointValue), MeasurementUnitsCodeSequence(emptyDefaultItem /*emptyDefaultSequence*/), NumericValue(DCM_NumericValue), + ObservationDateTime(DCM_ObservationDateTime), PersonName(DCM_PersonName), RationalDenominatorValue(DCM_RationalDenominatorValue), RationalNumeratorValue(DCM_RationalNumeratorValue), @@ -49,6 +50,7 @@ DRTQuantityDefinitionSequence::Item::Item(const Item ©) FloatingPointValue(copy.FloatingPointValue), MeasurementUnitsCodeSequence(copy.MeasurementUnitsCodeSequence), NumericValue(copy.NumericValue), + ObservationDateTime(copy.ObservationDateTime), PersonName(copy.PersonName), RationalDenominatorValue(copy.RationalDenominatorValue), RationalNumeratorValue(copy.RationalNumeratorValue), @@ -78,6 +80,7 @@ DRTQuantityDefinitionSequence::Item &DRTQuantityDefinitionSequence::Item::operat FloatingPointValue = copy.FloatingPointValue; MeasurementUnitsCodeSequence = copy.MeasurementUnitsCodeSequence; NumericValue = copy.NumericValue; + ObservationDateTime = copy.ObservationDateTime; PersonName = copy.PersonName; RationalDenominatorValue = copy.RationalDenominatorValue; RationalNumeratorValue = copy.RationalNumeratorValue; @@ -97,6 +100,7 @@ void DRTQuantityDefinitionSequence::Item::clear() { /* clear all DICOM attributes */ ValueType.clear(); + ObservationDateTime.clear(); ConceptNameCodeSequence.clear(); DateTime.clear(); Date.clear(); @@ -118,6 +122,7 @@ void DRTQuantityDefinitionSequence::Item::clear() OFBool DRTQuantityDefinitionSequence::Item::isEmpty() { return ValueType.isEmpty() && + ObservationDateTime.isEmpty() && ConceptNameCodeSequence.isEmpty() && DateTime.isEmpty() && Date.isEmpty() && @@ -149,6 +154,7 @@ OFCondition DRTQuantityDefinitionSequence::Item::read(DcmItem &item) /* re-initialize object */ clear(); getAndCheckElementFromDataset(item, ValueType, "1", "1", "QuantityDefinitionSequence"); + getAndCheckElementFromDataset(item, ObservationDateTime, "1", "3", "QuantityDefinitionSequence"); ConceptNameCodeSequence.read(item, "1-n", "1", "QuantityDefinitionSequence"); getAndCheckElementFromDataset(item, DateTime, "1", "1C", "QuantityDefinitionSequence"); getAndCheckElementFromDataset(item, Date, "1", "1C", "QuantityDefinitionSequence"); @@ -176,6 +182,7 @@ OFCondition DRTQuantityDefinitionSequence::Item::write(DcmItem &item) { result = EC_Normal; addElementToDataset(result, item, new DcmCodeString(ValueType), "1", "1", "QuantityDefinitionSequence"); + addElementToDataset(result, item, new DcmDateTime(ObservationDateTime), "1", "3", "QuantityDefinitionSequence"); if (result.good()) result = ConceptNameCodeSequence.write(item, "1-n", "1", "QuantityDefinitionSequence"); addElementToDataset(result, item, new DcmDateTime(DateTime), "1", "1C", "QuantityDefinitionSequence"); addElementToDataset(result, item, new DcmDate(Date), "1", "1C", "QuantityDefinitionSequence"); @@ -249,6 +256,15 @@ OFCondition DRTQuantityDefinitionSequence::Item::getNumericValue(OFVector MeasurementValue; + + typedef TID1419_ROIMeasurements_Measurement + TID1419_Measurement; + /** (default) constructor ** @param createGroup flag indicating whether to create an empty measurement group * by calling createMeasurementGroup() during startup */ TID1411_VolumetricROIMeasurements(const OFBool createGroup = OFFalse); + /** clear internal member variables. + * Also see notes on the clear() method of the base class. + */ + virtual void clear(); + /** check whether the current internal state is valid. * That means, whether the base class is valid and whether all mandatory content - * items and included templates are valid, i.e. hasMeasurementGroup(), + * items and included templates are valid (present), i.e. hasMeasurementGroup(), * hasTrackingIdentifier(), hasTrackingUniqueIdentifier(), hasReferencedSegment(), * hasSourceSeriesForSegmentation() and hasROIMeasurements() return true. ** @return OFTrue if valid, OFFalse otherwise @@ -90,9 +89,10 @@ class DCMTK_CMR_EXPORT TID1411_VolumetricROIMeasurements OFBool isValid() const; /** check whether the 'Measurement Group' content item (TID 1411 - Row 1) is present. - * Initially, this mandatory content item is created by the constructor of this - * class (if not disabled). After clear() has been called, it can be created again - * by calling createMeasurementGroup(). + * This mandatory content item can be created by the constructor of this class (if + * not disabled, which is the default) or internally by createMeasurementGroup(). + * After clear() has been called, the content item has to be recreated, which is + * done automatically when needed. ** @param checkChildren optional flag indicating whether to also check for any * children, i.e.\ whether the respective content item has * child nodes. By default, the presence of the higher-level @@ -127,10 +127,28 @@ class DCMTK_CMR_EXPORT TID1411_VolumetricROIMeasurements OFBool hasSourceSeriesForSegmentation() const; /** check whether there is an included 'ROI Measurements' template (TID 1411 - - * Row 15) in this measurement template. This included template is mandatory. - ** @return OFTrue if ROI measurements are present, OFFalse otherwise + * Row 15) in this measurement template. Initially, this mandatory sub-template + * is created and included by the constructor of this class. After clear() has + * been called, the content item has to be recreated, which is done automatically + * when needed. + ** @param checkChildren flag, which is enabled by default, indicating whether to + * check for any children, i.e.\ whether the respective + * sub-template has any content (child nodes). If OFFalse, + * the "included template" content item is checked only. + ** @return OFTrue if measurements are present, OFFalse otherwise + */ + OFBool hasMeasurements(const OFBool checkChildren = OFTrue) const; + + /** get current measurement value of this measurement group as defined by TID 1419 + * (ROI Measurements), i.e.\ the current instance of TID 1411 - Row 15. + * This included template is mandatory, i.e. should be present and not be empty. + * Further instances can be added by calling addMeasurement(). + ** @return reference to internally managed SR template (current instance) */ - OFBool hasROIMeasurements() const; + inline TID1419_Measurement &getMeasurement() const + { + return *OFstatic_cast(TID1419_Measurement *, Measurement.get()); + } /** set the value of the 'Activity Session' content item (TID 1411 - Row 1b). * A measurement group is created automatically (if none is present). If the @@ -254,41 +272,74 @@ class DCMTK_CMR_EXPORT TID1411_VolumetricROIMeasurements * A measurement group is created automatically (if none is present). If the * content item already exists, its value is overwritten. ** @param method coded entry describing the method used for measuring the values - * (e.g.\ from the given context group 'T_Method') + * in the group (e.g.\ from the given context group 'T_Method') * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setMeasurementMethod(const T_Method &method, const OFBool check = OFTrue); - /** set the value of the 'Finding Site' content item (TID 1419 - Row 2). - * A measurement group is created automatically (if none is present). If the - * content item already exists, its value is overwritten. - ** @param site coded entry describing the anatomic location of the measurements + /** add a 'Finding Site' content item (TID 1419 - Row 2, 3 and 4). + * A measurement group is created automatically (if none is present). + * @note Originally, the associated content item had the value multiplicity "1" and + * thus the method was called setFindingSite(). This changed with CP-1591. The + * value multiplicity is now "1-n". The requirement type is still "User option". + ** @param site coded entry describing the anatomic location of the + * measurements in the current group + * @param laterality laterality associated with the 'site' (optional) + * @param siteModifier coded entry describing the topographical modifier of the + * 'site' (optional) * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ - OFCondition setFindingSite(const DSRCodedEntryValue &site, + OFCondition addFindingSite(const DSRCodedEntryValue &site, + const CID244e_Laterality &laterality = CID244e_Laterality(), + const DSRCodedEntryValue &siteModifier = DSRCodedEntryValue(), const OFBool check = OFTrue); - /** add a measurement as defined in 'ROI Measurements' (TID 1419 - Row 5, 7 and 8). - * There should be at least a single instance of the associated template. + /** add a measurement as defined in 'ROI Measurements' (TID 1419 - Row 5). + * A measurement group is created automatically (if none is present). There should + * be at least a single instance of the associated template. Access to the current + * instance is available through getMeasurement(). ** @param conceptName coded entry specifying the concept name of the measurement * (e.g.\ from the given context group 'T_Measurement') * @param numericValue numeric measurement value to be set. The measurement unit * could be taken from the baseline context group 'T_Units'. - * @param method optional method used for measuring the value - * (e.g.\ from the given context group 'T_Method') - * @param derivation optional method of deriving or calculating the value - * (e.g.\ from the context group 'T_Derivation') - * @param check if enabled, check value for validity before setting it + ** @param checkEmpty by default, it is checked whether the current instance of + * TID 1419 is empty, and thus no new instance is created. + * Setting this parameter to OFFalse disables this check and + * always creates and adds a new instance of this sub-template. + * @param checkValue if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addMeasurement(const T_Measurement &conceptName, const MeasurementValue &numericValue, - const T_Method &method = T_Method(), - const T_Derivation &derivation = T_Derivation(), - const OFBool check = OFTrue); + const OFBool checkEmpty = OFTrue, + const OFBool checkValue = OFTrue); + + /** add a qualitative evaluation related to the subject of the measurement group as a + * coded entry (TID 1411 - Row 16). + * A measurement group is created automatically (if none is present). + ** @param conceptName coded entry to be set as the concept name + * @param codeValue coded entry to be set as the value of the new content item + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addQualitativeEvaluation(const DSRCodedEntryValue &conceptName, + const DSRCodedEntryValue &codeValue, + const OFBool check = OFTrue); + + /** add a qualitative evaluation related to the subject of the measurement group in + * text form (TID 1411 - Row 17). + * A measurement group is created automatically (if none is present). + ** @param conceptName coded entry to be set as the concept name + * @param stringValue character string to be set as the value of the content item + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addQualitativeEvaluation(const DSRCodedEntryValue &conceptName, + const OFString &stringValue, + const OFBool check = OFTrue); protected: @@ -319,6 +370,12 @@ class DCMTK_CMR_EXPORT TID1411_VolumetricROIMeasurements const DSRCodedEntryValue &conceptName, const OFString &annotationText, const OFBool check); + + + private: + + // shared pointer to included template "ROI Measurements" (TID 1419, Row 5) + DSRSharedSubTemplate Measurement; }; diff --git a/dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h b/dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h new file mode 100644 index 00000000..c62f986c --- /dev/null +++ b/dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h @@ -0,0 +1,240 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Header file for class TID1419_ROIMeasurements_Measurement + * + * Author: Joerg Riesmeier + * + */ + + +#ifndef CMR_TID1419M_H +#define CMR_TID1419M_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsrstpl.h" + +#include "dcmtk/dcmsr/cmr/define.h" +#include "dcmtk/dcmsr/cmr/srnumvlu.h" +#include "dcmtk/dcmsr/cmr/cid244e.h" + + +// include this file in doxygen documentation + +/** @file tid1419m.h + * @brief Interface class for TID 1419 in module dcmsr/cmr + */ + + +/*---------------------* + * class declaration * + *---------------------*/ + +/** Implementation of the DCMR Template: + * TID 1419 - ROI Measurements (only the "Measurement" content item and its children). + * All added content items are annotated with a text in the format "TID 1419 - Row [n]". + ** @tparam T_Measurement concept names for the numeric measurements (context group) + * @tparam T_Units units of the numeric measurement values (context group) + * @tparam T_Method methods used for measuring the values (context group) + * @tparam T_Derivation methods of deriving or calculating the values (context group) + ** @note Please note that currently only the mandatory and some optional/conditional + * content items and included templates are supported. + * @note Also note that this template class requires explicit instantiation for those + * combinations of the template parameters that are actually used. This is + * because the implementation is "hidden" in a separate source file, which has + * some advantages over the usual header-only approach. + */ +template +class DCMTK_CMR_EXPORT TID1419_ROIMeasurements_Measurement + : public DSRSubTemplate +{ + + public: + + // type definition + typedef CMR_SRNumericMeasurementValueWithUnits MeasurementValue; + + /** default constructor + */ + TID1419_ROIMeasurements_Measurement(); + + /** constructor. + * Also creates an initial measurement by calling createMeasurement() internally. + ** @param conceptName coded entry specifying the concept name of the measurement + * (e.g.\ from the given context group 'T_Measurement') + * @param numericValue numeric measurement value to be set. The measurement unit + * could be taken from the baseline context group 'T_Units'. + * @param check if enabled, check value for validity before setting it + */ + TID1419_ROIMeasurements_Measurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check = OFTrue); + + /** clear internal member variables. + * Also see notes on the clear() method of the base class. + */ + virtual void clear(); + + /** check whether the current internal state is valid. + * That means, whether the base class is valid and whether all mandatory content + * items and included templates are valid, i.e. hasMeasurements() returns true. + ** @return OFTrue if valid, OFFalse otherwise + */ + OFBool isValid() const; + + /** check whether the 'Measurement' content item (TID 1419 - Row 5) is present. + * This content item is mandatory, i.e. should be present with a value. + ** @return OFTrue if a measurement is present, OFFalse otherwise + */ + OFBool hasMeasurement() const; + + /** create a new measurement. + * Clear the entire measurement and create the mandatory content item of this + * template, i.e.\ TID 1419 - Row 5. + ** @param conceptName coded entry specifying the concept name of the measurement + * (e.g.\ from the given context group 'T_Measurement') + * @param numericValue numeric measurement value to be set. The measurement unit + * could be taken from the baseline context group 'T_Units'. + * @param check if enabled, check value for validity before setting it + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition createNewMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check = OFTrue); + + /** add a 'Modifier' content item (TID 1419 - Row 6) with its concept name and value + ** @param conceptName coded entry describing the modifier type for the concept + * name of the measurement + * @param modifier coded entry describing the modifier value for the concept + * name of the measurement + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addModifier(const DSRCodedEntryValue &conceptName, + const DSRCodedEntryValue &modifier, + const OFBool check = OFTrue); + + /** set the value of the 'Measurement Method' content item (TID 1419 - Row 7). + * If the content item already exists, its value is overwritten. + ** @param method coded entry describing the method used for measuring the value + * (e.g.\ from the given context group 'T_Method') + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setMeasurementMethod(const T_Method &method, + const OFBool check = OFTrue); + + /** set the value of the 'Derivation' content item (TID 1419 - Row 8). + * If the content item already exists, its value is overwritten. + ** @param derivation coded entry describing the method of deriving or calculating + * the value (e.g.\ from the context group 'T_Derivation') + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setDerivation(const T_Derivation &derivation, + const OFBool check = OFTrue); + + /** add a 'Finding Site' content item (TID 1419 - Row 9, 10 and 11) + ** @param site coded entry describing the anatomic location of the + * measurement + * @param laterality laterality associated with the 'site' (optional) + * @param siteModifier coded entry describing the topographical modifier of the + * 'site' (optional) + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addFindingSite(const DSRCodedEntryValue &site, + const CID244e_Laterality &laterality = CID244e_Laterality(), + const DSRCodedEntryValue &siteModifier = DSRCodedEntryValue(), + const OFBool check = OFTrue); + + /** add a 'Derivation Parameter' content item (TID 1419 - Row 13). + * This is a by-value relationship. + ** @param conceptName coded entry describing the concept name of the derivation + * parameter + * @param numericValue numeric measurement value of the derivation parameter + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addDerivationParameter(const DSRCodedEntryValue &conceptName, + const CMR_SRNumericMeasurementValue &numericValue, + const OFBool check = OFTrue); + + + /** set the value of the 'Equivalent Meaning of Concept Name' content item (TID 1419 + * - Row 18). If the content item already exists, its value is overwritten. + ** @param meaning human-readable meaning of the concept name of the measurement + * that is equivalent to the post-coordinated meaning conveyed by + * the coded name and its concept modifier children + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setEquivalentMeaningOfConceptName(const OFString &meaning, + const OFBool check = OFTrue); + + /** set the value of the 'Real World Value Map used for measurement' content item + * (TID 1419 - Row 19). + * If the content item already exists, its value is overwritten. + ** @param valueMap reference to a real world value mapping object applied to the + * stored image pixel values before their use for a measurement + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setRealWorldValueMap(const DSRCompositeReferenceValue &valueMap, + const OFBool check = OFTrue); + + /** set the value of the 'Real World Value Map used for measurement' content item + * (TID 1419 - Row 19). + * If the content item already exists, its value is overwritten. + ** @param dataset DICOM dataset from which the values for the reference to a + * real world value mapping object (SOP class UID and SOP instance + * UID) should be retrieved + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setRealWorldValueMap(DcmItem &dataset, + const OFBool check = OFTrue); + + + protected: + + /** create the mandatory root content item of this template, i.e.\ TID 1419 - Row 5. + * It is expected that the tree is currently empty. + ** @param conceptName coded entry specifying the concept name of the measurement + * (e.g.\ from the given context group 'T_Measurement') + * @param numericValue numeric measurement value to be set. The measurement unit + * could be taken from the baseline context group 'T_Units'. + * @param check if enabled, check value for validity before setting it + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition createMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check); + + /** add a new or replace an existing content item with a given node ID. + * If the content item does not exist, it is added to the measurement, i.e. below + * the root node. If it does exist, both the 'valueType' and 'conceptName' are + * checked before replacing the value. However, the value is not replaced by this + * method. This is up to the caller after this method returned with success. + ** @param nodePos index of the list entry that stores the ID of the node + * to search for + * @param relationshipType relationship type of the content item to be added/replaced + * @param valueType value type of the content item to be added/replaced + * @param conceptName concept name of the content item to be added/replaced + * @param annotationText optional text used to annotate the content item + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addOrReplaceContentItem(const size_t nodePos, + const E_RelationshipType relationshipType, + const E_ValueType valueType, + const DSRCodedEntryValue &conceptName, + const OFString &annotationText, + const OFBool check); +}; + + +#endif diff --git a/dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h b/dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h index 59813a65..9892b8d7 100644 --- a/dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h +++ b/dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class TID1500_MeasurementReport @@ -22,6 +22,7 @@ #include "dcmtk/dcmsr/cmr/tid1001.h" #include "dcmtk/dcmsr/cmr/tid1204.h" #include "dcmtk/dcmsr/cmr/tid1411.h" +#include "dcmtk/dcmsr/cmr/tid1501.h" #include "dcmtk/dcmsr/cmr/tid1600.h" #include "dcmtk/dcmsr/cmr/cid100.h" #include "dcmtk/dcmsr/cmr/cid6147.h" @@ -34,7 +35,7 @@ // include this file in doxygen documentation /** @file tid1500.h - * @brief Interface class and error constants for TID 1500 in module dcmsr/cmr + * @brief Interface class for TID 1500 in module dcmsr/cmr */ @@ -42,12 +43,18 @@ * constant definitions * *------------------------*/ -/** @name specific error conditions for TID 1500 in module dcmsr/cmr +/** @name specific error conditions for TID 1500 (and included templates) in module dcmsr/cmr */ //@{ /// error: there is no measurement report to add content items to extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoMeasurementReport; +/// error: there is no measurement group to add entries to +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoMeasurementGroup; +/// error: the given segmentation object does not conform to the template constraints +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_InvalidSegmentationObject; +/// error: the given DICOM object is not a real world value mapping object +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_InvalidRealWorldValueMappingObject; //@} @@ -57,9 +64,9 @@ extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoMeasurementReport; *---------------------*/ /** Implementation of DCMR Template: - * TID 1500 - Measurement Report (and included templates 1204, 1001, 1600, 1411). + * TID 1500 - Measurement Report (and included templates 1204, 1001, 1600, 1411, 1501). * All added content items are annotated with a text in the format "TID 1500 - Row [n]". - ** @note Please note that currently only the mandatory (and some optional/conditional) + ** @note Please note that currently only the mandatory and some optional/conditional * content items and included templates are supported. */ class DCMTK_CMR_EXPORT TID1500_MeasurementReport @@ -68,20 +75,28 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport public: - // type definition + // type definitions typedef TID1411_VolumetricROIMeasurements TID1411_Measurements; + typedef TID1501_MeasurementGroup + TID1501_Measurements; + /** (default) constructor. * Also creates an initial, almost empty measurement report by calling * createNewMeasurementReport(), but only if a non-empty 'title' is passed. ** @param title optional document title to be set (from CID 7021 - Measurement * Report Document Titles), i.e.\ the concept name of the root node + * @param check if enabled, check value for validity before setting it */ - TID1500_MeasurementReport(const CID7021_MeasurementReportDocumentTitles &title = CID7021_MeasurementReportDocumentTitles()); + TID1500_MeasurementReport(const CID7021_MeasurementReportDocumentTitles &title = CID7021_MeasurementReportDocumentTitles(), + const OFBool check = OFTrue); /** clear internal member variables. * Also see notes on the clear() method of the base class. @@ -92,6 +107,8 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport * That means, check whether the base class is valid, the mandatory included * templates TID 1204, 1001 and 1600 are valid, and whether hasProcedureReported() * as well as hasImagingMeasurements() or hasQualitativeEvaluations() return true. + * In addition, each of the included templates TID 1411 and 1501 should either be + * empty or valid. ** @return OFTrue if valid, OFFalse otherwise */ virtual OFBool isValid() const; @@ -103,6 +120,19 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport */ OFBool hasProcedureReported() const; + /** check whether there is an 'Imaging Measurements' content item (TID 1500 - Row 6) + * in this measurement report. Initially, this conditional content item is created + * by the constructor of this class. After clear() has been called or no document + * title is passed to the constructor, it can be created again by calling + * createNewMeasurementReport(). + ** @param checkChildren optional flag indicating whether to also check for any + * children, i.e.\ whether the respective content item has + * child nodes. By default, the presence of the higher-level + * CONTAINER is checked only. + ** @return OFTrue if imaging measurements are present, OFFalse otherwise + */ + OFBool hasImagingMeasurements(const OFBool checkChildren = OFFalse) const; + /** check whether there is an included 'Volumetric ROI Measurements' template * (TID 1500 - Row 8) in this measurement report. Initially, this optional * sub-template is created and included by the constructor of this class. After @@ -116,18 +146,18 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport */ OFBool hasVolumetricROIMeasurements(const OFBool checkChildren = OFFalse) const; - /** check whether there is an 'Imaging Measurements' content item (TID 1500 - Row 6) - * in this measurement report. Initially, this conditional content item is created - * by the constructor of this class. After clear() has been called or no document - * title is passed to the constructor, it can be created again by calling - * createNewMeasurementReport(). + /** check whether there is an included 'Measurement Group' template (TID 1500 - + * Row 9) in this measurement report. Initially, this optional sub-template is + * created and included by the constructor of this class. After clear() has been + * called or no document title is passed to the constructor, it can be created again + * by calling createNewMeasurementReport(). ** @param checkChildren optional flag indicating whether to also check for any - * children, i.e.\ whether the respective content item has - * child nodes. By default, the presence of the higher-level - * CONTAINER is checked only. - ** @return OFTrue if imaging measurements are present, OFFalse otherwise + * children, i.e.\ whether the respective sub-template has + * any content (child nodes). By default, the presence of + * the "included template" content item is checked only. + ** @return OFTrue if volumetric ROI measurements are present, OFFalse otherwise */ - OFBool hasImagingMeasurements(const OFBool checkChildren = OFFalse) const; + OFBool hasIndividualMeasurements(const OFBool checkChildren = OFFalse) const; /** check whether there is an 'Qualitative Evaluations' content item (TID 1500 - * Row 12) in this measurement report @@ -177,6 +207,17 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport return *OFstatic_cast(TID1411_Measurements *, VolumetricROIMeasurements.get()); } + /** get individual measurements of this report as defined by TID 1501 (Measurement + * Group), i.e.\ the current instance of TID 1500 - Row 9. + * This included template is optional, i.e. might be empty (but not absent). + * Further instances can be added by calling addIndividualMeasurements(). + ** @return reference to internally managed SR template (current instance) + */ + inline TID1501_Measurements &getIndividualMeasurements() const + { + return *OFstatic_cast(TID1501_Measurements *, MeasurementGroup.get()); + } + /** get document title of this report, i.e.\ the concept name of the root node ** @param titleCode coded entry that specifies the document title of this report ** @return status, EC_Normal if successful, an error code otherwise @@ -185,12 +226,14 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport /** create a new measurement report. * Clear the report and create the mandatory (and other supported) content items of - * this template, i.e.\ TID 1500 - Row 1 to 6 and 8. + * this template, i.e.\ TID 1500 - Row 1 to 6 and 8 to 9. ** @param title document title to be set (from CID 7021 - Measurement Report * Document Titles), i.e.\ the concept name of the root node + * @param check if enabled, check value for validity before setting it ** @return status, EC_Normal if successful, an error code otherwise */ - OFCondition createNewMeasurementReport(const CID7021_MeasurementReportDocumentTitles &title); + OFCondition createNewMeasurementReport(const CID7021_MeasurementReportDocumentTitles &title, + const OFBool check = OFTrue); /** set language of this report as defined by TID 1204 (Language of Content Item and * Descendants) @@ -219,9 +262,27 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport * an included template to this report (TID 1500 - Row 8). A first instance of * TID 1411 is created and added by calling createNewMeasurementReport(). Access * to the current instance is available through getVolumetricROIMeasurements(). + ** @param checkEmpty by default, it is checked whether the current instance of + * TID 1411 is empty, and thus no new instance is created. + * Setting this parameter to OFFalse disables this check and + * always creates and adds a new instance of this sub-template. + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addVolumetricROIMeasurements(const OFBool checkEmpty = OFTrue); + + /** create another instance of TID 1501 (Measurement Group) and add it as an included + * template to this report (TID 1500 - Row 9). A first instance of TID 1501 is + * created and added by calling createNewMeasurementReport(). Access to the current + * instance is available through getIndividualMeasurements(). + * Please note that a new instance of TID 1501 is only added if the current one is + * not empty! + ** @param checkEmpty by default, it is checked whether the current instance of + * TID 1501 is empty, and thus no new instance is created. + * Setting this parameter to OFFalse disables this check and + * always creates and adds a new instance of this sub-template. ** @return status, EC_Normal if successful, an error code otherwise */ - OFCondition addVolumetricROIMeasurements(); + OFCondition addIndividualMeasurements(const OFBool checkEmpty = OFTrue); /** add a qualitative evaluation related to the entire subject of the report as a * coded entry (TID 1500 - Row 13). The higher-level CONTAINER (Row 12) is created @@ -254,9 +315,11 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport * i.e.\ TID 1500 - Row 1 to 6 and 8. It is expected that the tree is currently * empty. ** @param title coded entry that specifies the document title to be set + * @param check if enabled, check value for validity before setting it ** @return status, EC_Normal if successful, an error code otherwise */ - OFCondition createMeasurementReport(const CID7021_MeasurementReportDocumentTitles &title); + OFCondition createMeasurementReport(const CID7021_MeasurementReportDocumentTitles &title, + const OFBool check); /** create the 'Qualitative Evaluations' content item (TID 1500 - Row 12) if not * existing yet @@ -275,6 +338,8 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport DSRSharedSubTemplate ImageLibrary; // shared pointer to included template "Volumetric ROI Measurements" (TID 1411) DSRSharedSubTemplate VolumetricROIMeasurements; + // shared pointer to included template "Measurement Group" (TID 1501) + DSRSharedSubTemplate MeasurementGroup; }; @@ -285,6 +350,9 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport // define short names for the SR template classes typedef TID1500_MeasurementReport CMR_TID1500; typedef TID1500_MeasurementReport::TID1411_Measurements CMR_TID1411_in_TID1500; +typedef TID1500_MeasurementReport::TID1411_Measurements::TID1419_Measurement CMR_TID1419_in_TID1411_in_TID1500; +typedef TID1500_MeasurementReport::TID1501_Measurements CMR_TID1501_in_TID1500; +typedef TID1500_MeasurementReport::TID1501_Measurements::TID300_Measurement CMR_TID300_in_TID1501_in_TID1500; #endif diff --git a/dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h b/dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h new file mode 100644 index 00000000..b9349e73 --- /dev/null +++ b/dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h @@ -0,0 +1,318 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Header file for class TID1501_MeasurementGroup + * + * Author: Joerg Riesmeier + * + */ + + +#ifndef CMR_TID1501_H +#define CMR_TID1501_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsrstpl.h" + +#include "dcmtk/dcmsr/cmr/define.h" +#include "dcmtk/dcmsr/cmr/tid300.h" +#include "dcmtk/dcmsr/cmr/cid244e.h" +#include "dcmtk/dcmsr/cmr/cid6147.h" +#include "dcmtk/dcmsr/cmr/cid7181.h" +#include "dcmtk/dcmsr/cmr/cid7464.h" +#include "dcmtk/dcmsr/cmr/cid7469.h" + + +// include this file in doxygen documentation + +/** @file tid1501.h + * @brief Interface class for TID 1501 in module dcmsr/cmr + */ + + +/*---------------------* + * class declaration * + *---------------------*/ + +/** Implementation of DCMR Template: + * TID 1501 - Measurement Group (and included templates 1502 and 300). + * All added content items are annotated with a text in the format "TID 1501 - Row [n]". + ** @tparam T_Measurement concept names for the numeric measurements (context group) + * @tparam T_Units units of the numeric measurement values (context group) + * @tparam T_Method methods used for measuring the values (context group) + * @tparam T_Derivation methods of deriving or calculating the values (context group) + * @note Please note that this template class requires explicit instantiation for those + * combinations of the template parameters that are actually used. This is + * because the implementation is "hidden" in a separate source file, which has + * some advantages over the usual header-only approach. + */ +template +class DCMTK_CMR_EXPORT TID1501_MeasurementGroup + : public DSRSubTemplate +{ + + public: + + // type definitions + typedef CMR_SRNumericMeasurementValueWithUnits MeasurementValue; + + typedef ::TID300_Measurement + TID300_Measurement; + + /** (default) constructor + ** @param createGroup flag indicating whether to create an empty measurement group + * by calling createMeasurementGroup() during startup + */ + TID1501_MeasurementGroup(const OFBool createGroup = OFFalse); + + /** clear internal member variables. + * Also see notes on the clear() method of the base class. + */ + virtual void clear(); + + /** check whether the current internal state is valid. + * That means, whether the base class is valid and whether all mandatory content + * items and included templates are valid (present), i.e. hasMeasurementGroup(), + * hasTrackingIdentifier(), hasTrackingUniqueIdentifier() and hasMeasurements() + * return true. + ** @return OFTrue if valid, OFFalse otherwise + */ + OFBool isValid() const; + + /** check whether the 'Measurement Group' content item (TID 1501 - Row 1) is present. + * This mandatory content item can be created by the constructor of this class (if + * not disabled, which is the default) or internally by createMeasurementGroup(). + * After clear() has been called, the content item has to be recreated, which is + * done automatically when needed. + ** @param checkChildren optional flag indicating whether to also check for any + * children, i.e.\ whether the respective content item has + * child nodes. By default, the presence of the higher-level + * CONTAINER is checked only. + ** @return OFTrue if the measurement group is present, OFFalse otherwise + */ + OFBool hasMeasurementGroup(const OFBool checkChildren = OFFalse) const; + + /** check whether the 'Tracking Identifier' content item (TID 1501 - Row 2) is + * present. This content item is mandatory, i.e. should be present with a value. + ** @return OFTrue if the tracking identifier is present, OFFalse otherwise + */ + OFBool hasTrackingIdentifier() const; + + /** check whether the 'Tracking Unique Identifier' content item (TID 1501 - Row 3) is + * present. This content item is mandatory, i.e. should be present with a value. + ** @return OFTrue if the tracking unique identifier is present, OFFalse otherwise + */ + OFBool hasTrackingUniqueIdentifier() const; + + /** check whether there is an included 'Measurement' template (TID 1501 - Row 10) in + * this measurement template. Initially, this mandatory sub-template is created and + * included by the constructor of this class. After clear() has been called, the + * content item has to be recreated, which is done automatically when needed. + ** @param checkChildren flag, which is enabled by default, indicating whether to + * check for any children, i.e.\ whether the respective + * sub-template has any content (child nodes). If OFFalse, + * the "included template" content item is checked only. + ** @return OFTrue if measurements are present, OFFalse otherwise + */ + OFBool hasMeasurements(const OFBool checkChildren = OFTrue) const; + + /** get current measurement value of this measurement group as defined by TID 300 + * (Measurement), i.e.\ the current instance of TID 1501 - Row 10. + * This included template is mandatory, i.e. should be present and not be empty. + * Further instances can be added by calling addMeasurement(). + ** @return reference to internally managed SR template (current instance) + */ + inline TID300_Measurement &getMeasurement() const + { + return *OFstatic_cast(TID300_Measurement *, Measurement.get()); + } + + /** set the value of the 'Activity Session' content item (TID 1501 - Row 1b). + * A measurement group is created automatically (if none is present). If the + * content item already exists, its value is overwritten. + ** @param session identifier of the session during which the measurements were made + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setActivitySession(const OFString &session, + const OFBool check = OFTrue); + + /** set the value of the 'Tracking Identifier' content item (TID 1501 - Row 2). + * A measurement group is created automatically (if none is present). If the + * content item already exists, its value is overwritten. + ** @param trackingID a text label used for tracking a finding or feature + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setTrackingIdentifier(const OFString &trackingID, + const OFBool check = OFTrue); + + /** set the value of the 'Tracking Unique Identifier' content item (TID 1501 - Row 3). + * A measurement group is created automatically (if none is present). If the + * content item already exists, its value is overwritten. + ** @param trackingUID a unique identifier used for tracking a finding or feature + * (associated DICOM VR=UI) + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setTrackingUniqueIdentifier(const OFString &trackingUID, + const OFBool check = OFTrue); + + /** set the value of the 'Finding' content item (TID 1501 - Row 3b). + * A measurement group is created automatically (if none is present). If the + * content item already exists, its value is overwritten. + ** @param finding coded entry that describes the type of the finding + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setFinding(const DSRCodedEntryValue &finding, + const OFBool check = OFTrue); + + /** set the value of the 'Time Point' content item (TID 1502 - Row 3). + * A measurement group is created automatically (if none is present). If the + * content item already exists, its value is overwritten. + ** @param timePoint a short pre-defined label that is human-readable + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setTimePoint(const OFString &timePoint, + const OFBool check = OFTrue); + + /** set the value of the 'Measurement Method' content item (TID 1501 - Row 5). + * A measurement group is created automatically (if none is present). If the + * content item already exists, its value is overwritten. + ** @param method coded entry describing the method used for measuring the values + * in the group (e.g.\ from the given context group 'T_Method') + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setMeasurementMethod(const T_Method &method, + const OFBool check = OFTrue); + + /** add a 'Finding Site' content item (TID 1501 - Row 6, 7 and 8). + * A measurement group is created automatically (if none is present). + ** @param site coded entry describing the anatomic location of the + * measurements in the current group + * @param laterality laterality associated with the 'site' (optional) + * @param siteModifier coded entry describing the topographical modifier of the + * 'site' (optional) + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addFindingSite(const DSRCodedEntryValue &site, + const CID244e_Laterality &laterality = CID244e_Laterality(), + const DSRCodedEntryValue &siteModifier = DSRCodedEntryValue(), + const OFBool check = OFTrue); + + /** set the value of the 'Real World Value Map used for measurement' content item + * (TID 1501 - Row 9). A measurement group is created automatically (if none is + * present). If the content item already exists, its value is overwritten. + ** @param valueMap reference to a real world value mapping object applied to the + * stored image pixel values before their use for a measurement + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setRealWorldValueMap(const DSRCompositeReferenceValue &valueMap, + const OFBool check = OFTrue); + + /** set the value of the 'Real World Value Map used for measurement' content item + * (TID 1501 - Row 9). A measurement group is created automatically (if none is + * present). If the content item already exists, its value is overwritten. + ** @param dataset DICOM dataset from which the values for the reference to a + * real world value mapping object (SOP class UID and SOP instance + * UID) should be retrieved + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setRealWorldValueMap(DcmItem &dataset, + const OFBool check = OFTrue); + + /** add a measurement as defined in 'Measurement' (TID 300 - Row 1). + * A measurement group is created automatically (if none is present). There should + * be at least a single instance of the associated template. Access to the current + * instance is available through getMeasurement(). + ** @param conceptName coded entry specifying the concept name of the measurement + * (e.g.\ from the given context group 'T_Measurement') + * @param numericValue numeric measurement value to be set. The measurement unit + * could be taken from the baseline context group 'T_Units'. + ** @param checkEmpty by default, it is checked whether the current instance of + * TID 300 is empty, and thus no new instance is created. + * Setting this parameter to OFFalse disables this check and + * always creates and adds a new instance of this sub-template. + * @param checkValue if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool checkEmpty = OFTrue, + const OFBool checkValue = OFTrue); + + /** add a qualitative evaluation related to the subject of the measurement group as a + * coded entry (TID 1501 - Row 11). + * A measurement group is created automatically (if none is present). + ** @param conceptName coded entry to be set as the concept name + * @param codeValue coded entry to be set as the value of the new content item + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addQualitativeEvaluation(const DSRCodedEntryValue &conceptName, + const DSRCodedEntryValue &codeValue, + const OFBool check = OFTrue); + + /** add a qualitative evaluation related to the subject of the measurement group in + * text form (TID 1501 - Row 12). + * A measurement group is created automatically (if none is present). + ** @param conceptName coded entry to be set as the concept name + * @param stringValue character string to be set as the value of the content item + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addQualitativeEvaluation(const DSRCodedEntryValue &conceptName, + const OFString &stringValue, + const OFBool check = OFTrue); + + + protected: + + /** create the mandatory root content item of this template, i.e.\ TID 1501 - Row 1. + * It is expected that the tree is currently empty. + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition createMeasurementGroup(); + + /** add a new or replace an existing content item with a given node ID. + * If the content item does not exist, it is added to the measurement group, i.e. + * below the root node. If it does exist, both the 'valueType' and 'conceptName' + * are checked before replacing the value. However, the value is not replaced by + * this method. This is up to the caller after this method returned with success. + ** @param nodePos index of the list entry that stores the ID of the node + * to search for + * @param relationshipType relationship type of the content item to be added/replaced + * @param valueType value type of the content item to be added/replaced + * @param conceptName concept name of the content item to be added/replaced + * @param annotationText optional text used to annotate the content item + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addOrReplaceContentItem(const size_t nodePos, + const E_RelationshipType relationshipType, + const E_ValueType valueType, + const DSRCodedEntryValue &conceptName, + const OFString &annotationText, + const OFBool check); + + + private: + + // shared pointer to included template "Measurement" (TID 300) + DSRSharedSubTemplate Measurement; +}; + + +#endif diff --git a/dcmsr/include/dcmtk/dcmsr/cmr/tid15def.h b/dcmsr/include/dcmtk/dcmsr/cmr/tid15def.h new file mode 100644 index 00000000..26702cb1 --- /dev/null +++ b/dcmsr/include/dcmtk/dcmsr/cmr/tid15def.h @@ -0,0 +1,50 @@ +/* + * + * Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Header file for common error constants used in TID 14xx/15xx + * + * Author: Joerg Riesmeier + * + */ + + +#ifndef CMR_TID15DEF_H +#define CMR_TID15DEF_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/ofstd/ofcond.h" +#include "dcmtk/dcmsr/cmr/define.h" + + +// include this file in doxygen documentation + +/** @file tid15def.h + * @brief Error constants for TID 14xx/15xx in module dcmsr/cmr + */ + + +/*------------------------* + * constant definitions * + *------------------------*/ + +/** @name specific error conditions for TID 1500 (and included templates) in module dcmsr/cmr + */ +//@{ + +/// error: there is no measurement report to add content items to +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoMeasurementReport; +/// error: there is no measurement group to add entries to +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoMeasurementGroup; +/// error: there is no measurement to add entries to +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoMeasurement; +/// error: the given segmentation object does not conform to the template constraints +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_InvalidSegmentationObject; +/// error: the given DICOM object is not a real world value mapping object +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_InvalidRealWorldValueMappingObject; + +//@} + +#endif diff --git a/dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h b/dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h index e9b6f701..490c7cbd 100644 --- a/dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h +++ b/dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h @@ -44,14 +44,16 @@ extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoImageLibrary; extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoImageLibraryGroup; /// error: there is no image library entry to add descriptors to extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoImageLibraryEntry; -/// error: cannot add multiple image library entry descriptors (see TID 1600 Row 3) -extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_CannotAddMultipleImageLibraryEntryDescriptors; +/// error: cannot add multiple image library group descriptors (see TID 1600 Row 3) +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_CannotAddMultipleImageLibraryGroupDescriptors; /// error: the current (most recently added) image library entry has no modality descriptor extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_MissingImageLibraryEntryDescriptorModality; /// error: the current (most recently added) image library entry has the wrong modality descriptor extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_WrongImageLibraryEntryDescriptorModality; /// normal: there are no image library entry descriptors to be added (copied from the dataset) extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoImageLibraryEntryDescriptorsToBeAdded; +/// normal: there are no (common) image library entry descriptors to be moved (to the image group) +extern DCMTK_CMR_EXPORT const OFConditionConst CMR_EC_NoImageLibraryEntryDescriptorsToBeMoved; //@} @@ -72,6 +74,9 @@ class DCMTK_CMR_EXPORT TID1600_ImageLibrary public: + // type definition + typedef OFList ConceptNameList; + /** add mode for image entries */ enum AddImageMode @@ -79,7 +84,11 @@ class DCMTK_CMR_EXPORT TID1600_ImageLibrary /// add image entry without descriptors withoutDescriptors, /// add image entry with all descriptors from TID 1602 (and included templates) - withAllDescriptors + withAllDescriptors, + /// add image entry with selected descriptors only (from given list of concept names) + withSelectedDescriptors, + /// add image entry with all but the selected descriptors (from given list of concept names) + withoutSelectedDescriptors }; /** (default) constructor @@ -113,7 +122,9 @@ class DCMTK_CMR_EXPORT TID1600_ImageLibrary */ OFCondition createNewImageLibrary(); - /** add an image group to the image library + /** add an image group to the image library. + * Image descriptors that are common to all images in this group can be added by + * calling addImageGroupDescriptors(). ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addImageGroup(); @@ -122,29 +133,39 @@ class DCMTK_CMR_EXPORT TID1600_ImageLibrary * TID 1601 (Image Library Entry). The values of the content items (including * the image reference) are copied from the data elements of the given 'dataset'. * If no descriptors were added, CMR_EC_NoImageLibraryEntryDescriptorsToBeAdded - * is returned. - ** @param dataset DICOM dataset from which the values should be copied - * @param mode mode specifying which optional content items are to be added - * @param check if enabled, check values for validity before setting them + * is returned, which is not regarded as an error. + ** @param dataset DICOM dataset from which the values should be copied + * @param mode mode specifying which optional content items are to be added + * @param descriptors optional list with concept names of descriptors. Its use + * and interpretation depends on the value of 'mode'. + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise. If no * image group exists, CMR_EC_NoImageLibraryGroup is returned. */ OFCondition addImageEntry(DcmItem &dataset, - const AddImageMode mode = withoutDescriptors, + const AddImageMode mode, + const ConceptNameList &descriptors = ConceptNameList(), const OFBool check = OFTrue); - /** add image entry descriptors to the current image group, i.e.\ add content + /** add common image descriptors to the current image group, i.e.\ add content items * items for TID 1602 (Image Library Entry Descriptors) and included templates. * The values of the content items are copied from the data elements of the given * 'dataset'. If none were added, CMR_EC_NoImageLibraryEntryDescriptorsToBeAdded - * is returned. - * Please note that this method should only be called once for each image group. - ** @param dataset DICOM dataset from which the values should be copied - * @param check if enabled, check values for validity before setting them + * is returned, which is not regarded as an error. + * Please note that this method should be called only once for each image group. + * Alternatively, moveCommonImageDescriptorsToImageGroups() could be called to move + * common image descriptors to their respective image groups automatically. + ** @param dataset DICOM dataset from which the values should be copied + * @param mode mode specifying which optional content items are to be added + * @param descriptors optional list with concept names of descriptors. Its use + * and interpretation depends on the value of 'mode'. + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise. If no * image group exists, CMR_EC_NoImageLibraryGroup is returned. */ - OFCondition addImageEntryDescriptors(DcmItem &dataset, + OFCondition addImageGroupDescriptors(DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors = ConceptNameList(), const OFBool check = OFTrue); /** go to the most recently added image library entry and get the value of the @@ -155,6 +176,15 @@ class DCMTK_CMR_EXPORT TID1600_ImageLibrary */ OFCondition getImageEntryModality(DSRCodedEntryValue &modalityCode); + /** move common image descriptors from all image entries in this image library to + * their respective image groups. This method should usually be called after all + * image entries have been added using addImageEntry(). If no descriptors were + * moved, CMR_EC_NoImageLibraryEntryDescriptorsToBeMoved is returned, which is not + * regarded as an error. + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition moveCommonImageDescriptorsToImageGroups(); + // --- set modality-specific content manually --- /** set the value of the descriptor 'Radionuclide' (TID 1607 - Row 1) for the current @@ -237,13 +267,17 @@ class DCMTK_CMR_EXPORT TID1600_ImageLibrary /** add image library entry descriptors (TID 1602) to given document subtree. * This method also calls addModalitySpecificDescriptors() in order to add the * included templates (TID 1603 to 1607). - ** @param tree subtree to which the content items should be added - * @param dataset DICOM dataset from which the values should be copied - * @param check if enabled, check values for validity before setting them + ** @param tree subtree to which the content items should be added + * @param dataset DICOM dataset from which the values should be copied + * @param mode mode specifying which optional content items are to be added + * @param descriptors list with concept names of descriptors (depends on 'mode') + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addImageEntryDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check); /** add image library entry descriptors (TID 1603 to 1607) to given document @@ -251,70 +285,94 @@ class DCMTK_CMR_EXPORT TID1600_ImageLibrary * @warning The mapping of modality to included templates is probably not perfect * yet. Also please note that most DICOM element values are copied from * the main dataset and not from the respective functional group macros. - ** @param tree subtree to which the content items should be added - * @param dataset DICOM dataset from which the values should be copied - * @param modality value of the Modality (0008,0060) attribute from 'dataset' - * @param check if enabled, check values for validity before setting them + ** @param tree subtree to which the content items should be added + * @param dataset DICOM dataset from which the values should be copied + * @param modality value of the Modality (0008,0060) attribute from 'dataset' + * @param mode mode specifying which optional content items are to be added + * @param descriptors list with concept names of descriptors (depends on 'mode') + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addModalitySpecificDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, const OFString &modality, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check); /** add image library entry descriptors for projection radiography (TID 1603) - ** @param tree subtree to which the content items should be added - * @param dataset DICOM dataset from which the values should be copied - * @param check if enabled, check values for validity before setting them + ** @param tree subtree to which the content items should be added + * @param dataset DICOM dataset from which the values should be copied + * @param mode mode specifying which optional content items are to be added + * @param descriptors list with concept names of descriptors (depends on 'mode') + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addProjectionRadiographyDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check); /** add image library entry descriptors for cross-sectional modalities (TID 1604) - ** @param tree subtree to which the content items should be added - * @param dataset DICOM dataset from which the values should be copied - * @param check if enabled, check values for validity before setting them + ** @param tree subtree to which the content items should be added + * @param dataset DICOM dataset from which the values should be copied + * @param mode mode specifying which optional content items are to be added + * @param descriptors list with concept names of descriptors (depends on 'mode') + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addCrossSectionalModalitiesDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check); /** add image library entry descriptors for CT (TID 1605) - ** @param tree subtree to which the content items should be added - * @param dataset DICOM dataset from which the values should be copied - * @param check if enabled, check values for validity before setting them + ** @param tree subtree to which the content items should be added + * @param dataset DICOM dataset from which the values should be copied + * @param mode mode specifying which optional content items are to be added + * @param descriptors list with concept names of descriptors (depends on 'mode') + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addComputedTomographyDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check); /** add image library entry descriptors for MR (TID 1606) - ** @param tree subtree to which the content items should be added - * @param dataset DICOM dataset from which the values should be copied - * @param check if enabled, check values for validity before setting them + ** @param tree subtree to which the content items should be added + * @param dataset DICOM dataset from which the values should be copied + * @param mode mode specifying which optional content items are to be added + * @param descriptors list with concept names of descriptors (depends on 'mode') + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addMagneticResonanceDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check); /** add image library entry descriptors for PET (TID 1607). * @note The template rows 10 to 15 are not yet supported by this method. - ** @param tree subtree to which the content items should be added - * @param dataset DICOM dataset from which the values should be copied - * @param check if enabled, check values for validity before setting them + ** @param tree subtree to which the content items should be added + * @param dataset DICOM dataset from which the values should be copied + * @param mode mode specifying which optional content items are to be added + * @param descriptors list with concept names of descriptors (depends on 'mode') + * @param check if enabled, check values for validity before setting them ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition addPositronEmissionTomographyDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check); /** go to the most recently added image library entry and check the value of the - * descriptor 'Modality' (TID 1602 - Row 1) + * associated descriptor 'Modality' (TID 1602 - Row 1) ** @param modalityCode coded entry (from CID 29) associated with the modality. * Used to check the image library entry. ** @return status, EC_Normal if successful, an error code otherwise @@ -371,6 +429,25 @@ class DCMTK_CMR_EXPORT TID1600_ImageLibrary // --- static helper functions --- + /** check whether there are any descriptors to be added (based on given parameters) + ** @param mode mode specifying what should be checked and how + * @param descriptors list with concept names of descriptors (depends on 'mode') + * @return OFTrue if there are any descriptors to be added, OFFalse if not + */ + static OFBool anyDescriptorsToBeAdded(const AddImageMode mode, + const ConceptNameList &descriptors); + + /** check whether a given descriptor should be added (based on further parameters) + ** @param conceptName concept name of the descriptor to be checked + * @param mode mode specifying what should be checked and how + * @param descriptors list with concept names of descriptors to be checked + * (depending on the given 'mode') + * @return OFTrue if given descriptor should be added, OFFalse if not + */ + static OFBool checkDescriptorToBeAdded(const DSRBasicCodedEntry &conceptName, + const AddImageMode mode, + const ConceptNameList &descriptors); + /** add a content item with a string value copied from the given dataset. * The content item is only created and added to the subtree if the specified data * element is present in the 'dataset' and its string value is not empty. diff --git a/dcmsr/include/dcmtk/dcmsr/cmr/tid300.h b/dcmsr/include/dcmtk/dcmsr/cmr/tid300.h new file mode 100644 index 00000000..67d619e9 --- /dev/null +++ b/dcmsr/include/dcmtk/dcmsr/cmr/tid300.h @@ -0,0 +1,278 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Header file for class TID300_Measurement + * + * Author: Joerg Riesmeier + * + */ + + +#ifndef CMR_TID300_H +#define CMR_TID300_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsrstpl.h" + +#include "dcmtk/dcmsr/cmr/define.h" +#include "dcmtk/dcmsr/cmr/srnumvlu.h" +#include "dcmtk/dcmsr/cmr/cid244e.h" + + +// include this file in doxygen documentation + +/** @file tid300.h + * @brief Interface class for TID 300 in module dcmsr/cmr + */ + + +/*---------------------* + * class declaration * + *---------------------*/ + +/** Implementation of DCMR Template: + * TID 300 - Measurement (and included template 320). + * All added content items are annotated with a text in the format "TID 300 - Row [n]". + ** @tparam T_Measurement concept names for the numeric measurements (context group) + * @tparam T_Units units of the numeric measurement values (context group) + * @tparam T_Method methods used for measuring the values (context group) + * @tparam T_Derivation methods of deriving or calculating the values (context group) + ** @note Please note that currently only the mandatory and some optional/conditional + * content items and included templates are supported. + * @note Also note that this template class requires explicit instantiation for those + * combinations of the template parameters that are actually used. This is + * because the implementation is "hidden" in a separate source file, which has + * some advantages over the usual header-only approach. + */ +template +class DCMTK_CMR_EXPORT TID300_Measurement + : public DSRSubTemplate +{ + + public: + + // type definition + typedef CMR_SRNumericMeasurementValueWithUnits MeasurementValue; + + /** default constructor + */ + TID300_Measurement(); + + /** constructor. + * Also creates an initial measurement by calling createMeasurement() internally. + ** @param conceptName coded entry specifying the concept name of the measurement + * (e.g.\ from the given context group 'T_Measurement') + * @param numericValue numeric measurement value to be set. The measurement unit + * could be taken from the baseline context group 'T_Units'. + * @param check if enabled, check value for validity before setting it + */ + TID300_Measurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check = OFTrue); + + /** clear internal member variables. + * Also see notes on the clear() method of the base class. + */ + virtual void clear(); + + /** check whether the current internal state is valid. + * That means, whether the base class is valid and whether all mandatory content + * items and included templates are valid, i.e. hasMeasurement() returns true. + ** @return OFTrue if valid, OFFalse otherwise + */ + OFBool isValid() const; + + /** check whether the 'Measurement' content item (TID 300 - Row 1) is present. + * This content item is mandatory, i.e. should be present with a value. + ** @return OFTrue if the measurement is present, OFFalse otherwise + */ + OFBool hasMeasurement() const; + + /** create a new measurement. + * Clear the entire measurement and create the mandatory content item of this + * template, i.e.\ TID 300 - Row 1. + ** @param conceptName coded entry specifying the concept name of the measurement + * (e.g.\ from the given context group 'T_Measurement') + * @param numericValue numeric measurement value to be set. The measurement unit + * could be taken from the baseline context group 'T_Units'. + * @param check if enabled, check value for validity before setting it + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition createNewMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check = OFTrue); + + /** add a 'Modifier' content item (TID 300 - Row 2) with its concept name and value + ** @param conceptName coded entry describing the modifier type for the concept + * name of the measurement + * @param modifier coded entry describing the modifier value for the concept + * name of the measurement + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addModifier(const DSRCodedEntryValue &conceptName, + const DSRCodedEntryValue &modifier, + const OFBool check = OFTrue); + + /** set the value of the 'Measurement Method' content item (TID 300 - Row 3). + * If the content item already exists, its value is overwritten. + ** @param method coded entry describing the method used for measuring the value + * (e.g.\ from the given context group 'T_Method') + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setMeasurementMethod(const T_Method &method, + const OFBool check = OFTrue); + + /** set the value of the 'Derivation' content item (TID 300 - Row 4). + * If the content item already exists, its value is overwritten. + ** @param derivation coded entry describing the method of deriving or calculating + * the value (e.g.\ from the context group 'T_Derivation') + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setDerivation(const T_Derivation &derivation, + const OFBool check = OFTrue); + + /** add a 'Finding Site' content item (TID 300 - Row 5, 6 and 7) + ** @param site coded entry describing the anatomic location of the + * measurement + * @param laterality laterality associated with the 'site' (optional) + * @param siteModifier coded entry describing the topographical modifier of the + * 'site' (optional) + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addFindingSite(const DSRCodedEntryValue &site, + const CID244e_Laterality &laterality = CID244e_Laterality(), + const DSRCodedEntryValue &siteModifier = DSRCodedEntryValue(), + const OFBool check = OFTrue); + + /** add a 'Derivation Parameter' content item (TID 300 - Row 9). + * This is a by-value relationship. + ** @param conceptName coded entry describing the concept name of the derivation + * parameter + * @param numericValue numeric measurement value of the derivation parameter + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addDerivationParameter(const DSRCodedEntryValue &conceptName, + const CMR_SRNumericMeasurementValue &numericValue, + const OFBool check = OFTrue); + + /** add an 'Image' content item (TID 320 - Row 1) referencing the image used as a + * source of the measurement. This is a by-value relationship. + ** @param conceptName coded entry describing the purpose of reference + * @param imageReference reference to image used as a source of the measurement + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addImage(const DSRCodedEntryValue &conceptName, + const DSRImageReferenceValue &imageReference, + const OFBool check = OFTrue); + + /** add an 'Image' content item (TID 320 - Row 1) referencing the image used as a + * source of the measurement. This is a by-value relationship. + ** @param conceptName coded entry describing the purpose of reference + * @param dataset DICOM dataset from which the values for the reference to an + * image (SOP class UID and SOP instance UID), which was used + * as a source of the measurement, should be retrieved + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addImage(const DSRCodedEntryValue &conceptName, + DcmItem &dataset, + const OFBool check = OFTrue); + + /** add a 'Spatial Coordinates' content item (TID 320 - Row 3 and 4) referencing the + * image used as a source of the measurement. This is a by-value relationship. + ** @param conceptName coded entry describing the purpose of reference + * @param coordinatesValue spatial coordinates used as a source of the measurement + * @param imageReference reference to image the spatial coordinates are selected + * from + * @param check if enabled, check values for validity before setting + * them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addSpatialCoordinates(const DSRCodedEntryValue &conceptName, + const DSRSpatialCoordinatesValue &coordinatesValue, + const DSRImageReferenceValue &imageReference, + const OFBool check = OFTrue); + + /** set the value of the 'Equivalent Meaning of Concept Name' content item (TID 300 - + * Row 16). If the content item already exists, its value is overwritten. + ** @param meaning human-readable meaning of the concept name of the measurement + * that is equivalent to the post-coordinated meaning conveyed by + * the coded name and its concept modifier children + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setEquivalentMeaningOfConceptName(const OFString &meaning, + const OFBool check = OFTrue); + + /** set the value of the 'Real World Value Map used for measurement' content item + * (TID 300 - Row 18). + * If the content item already exists, its value is overwritten. + ** @param valueMap reference to a real world value mapping object applied to the + * stored image pixel values before their use for a measurement + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setRealWorldValueMap(const DSRCompositeReferenceValue &valueMap, + const OFBool check = OFTrue); + + /** set the value of the 'Real World Value Map used for measurement' content item + * (TID 300 - Row 18). + * If the content item already exists, its value is overwritten. + ** @param dataset DICOM dataset from which the values for the reference to a + * real world value mapping object (SOP class UID and SOP instance + * UID) should be retrieved + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition setRealWorldValueMap(DcmItem &dataset, + const OFBool check = OFTrue); + + + protected: + + /** create the mandatory root content item of this template, i.e.\ TID 300 - Row 1. + * It is expected that the tree is currently empty. + ** @param conceptName coded entry specifying the concept name of the measurement + * (e.g.\ from the given context group 'T_Measurement') + * @param numericValue numeric measurement value to be set. The measurement unit + * could be taken from the baseline context group 'T_Units'. + * @param check if enabled, check value for validity before setting it + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition createMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check); + + /** add a new or replace an existing content item with a given node ID. + * If the content item does not exist, it is added to the measurement, i.e. below + * the root node. If it does exist, both the 'valueType' and 'conceptName' are + * checked before replacing the value. However, the value is not replaced by this + * method. This is up to the caller after this method returned with success. + ** @param nodePos index of the list entry that stores the ID of the node + * to search for + * @param relationshipType relationship type of the content item to be added/replaced + * @param valueType value type of the content item to be added/replaced + * @param conceptName concept name of the content item to be added/replaced + * @param annotationText optional text used to annotate the content item + * @param check if enabled, check values for validity before setting them + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addOrReplaceContentItem(const size_t nodePos, + const E_RelationshipType relationshipType, + const E_ValueType valueType, + const DSRCodedEntryValue &conceptName, + const OFString &annotationText, + const OFBool check); +}; + + +#endif diff --git a/dcmsr/include/dcmtk/dcmsr/codes/dcm.h b/dcmsr/include/dcmtk/dcmsr/codes/dcm.h index 2d8e9e7f..7e017b72 100644 --- a/dcmsr/include/dcmtk/dcmsr/codes/dcm.h +++ b/dcmsr/include/dcmtk/dcmsr/codes/dcm.h @@ -3,10 +3,10 @@ * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * - * Header file with DICOM Code Definitions (Coding Scheme "DCM", Version "01") + * Header file with DICOM Controlled Terminology Code Definitions (Coding Scheme "DCM", Version "01") * - * Generated automatically from DICOM PS 3.16-2017a - * File created on 2017-03-10 17:34:41 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017e + * File created on 2017-12-05 09:12:40 by J. Riesmeier * */ @@ -23,18 +23,19 @@ * general information * *-----------------------*/ -#define CODE_DCM_CodingSchemeDesignator "DCM" -#define CODE_DCM_CodingSchemeName "DICOM" -#define CODE_DCM_CodingSchemeDescription "DICOM Controlled Terminology" -#define CODE_DCM_CodingSchemeUID "1.2.840.10008.2.16.4" +#define CODE_DCM_CodingSchemeDesignator "DCM" +#define CODE_DCM_CodingSchemeName "DICOM Controlled Terminology" +#define CODE_DCM_CodingSchemeDescription "PS3.16 Content Mapping Resource, Annex D" +#define CODE_DCM_CodingSchemeResponsibleOrganization "DICOM" +#define CODE_DCM_CodingSchemeUID "1.2.840.10008.2.16.4" /*--------------------* * code definitions * *--------------------*/ -// total number of codes: 3516 -// - retired: 143 +// total number of codes: 3861 +// - retired: 144 // - no name: 27 // - not unique: 15 @@ -246,8 +247,9 @@ #define CODE_DCM_PriorToVoiding DSRBasicCodedEntry("109134", "DCM", "Prior to voiding") #define CODE_DCM_PostVoiding DSRBasicCodedEntry("109135", "DCM", "Post voiding") #define CODE_DCM_NeutralMusculoskeletalPosition DSRBasicCodedEntry("109136", "DCM", "Neutral musculoskeletal position") +#define CODE_DCM_DuringVoiding DSRBasicCodedEntry("109137", "DCM", "During voiding") #define CODE_DCM_AmericaKennelClub DSRBasicCodedEntry("109200", "DCM", "America Kennel Club") -#define CODE_DCM_AmericaPetRegistryIncdot DSRBasicCodedEntry("109201", "DCM", "America's Pet Registry Inc.") +#define CODE_DCM_AmericaPetRegistryInc DSRBasicCodedEntry("109201", "DCM", "America's Pet Registry Inc.") #define CODE_DCM_AmericanCanineAssociation DSRBasicCodedEntry("109202", "DCM", "American Canine Association") #define CODE_DCM_AmericanPurebredRegistry DSRBasicCodedEntry("109203", "DCM", "American Purebred Registry") #define CODE_DCM_AmericanRareBreedAssociation DSRBasicCodedEntry("109204", "DCM", "American Rare Breed Association") @@ -465,6 +467,11 @@ #define CODE_DCM_RemoteServiceOperationStopped DSRBasicCodedEntry("110140", "DCM", "Remote Service Operation Stopped") #define CODE_DCM_LocalServiceOperationStarted DSRBasicCodedEntry("110141", "DCM", "Local Service Operation Started") #define CODE_DCM_LocalServiceOperationStopped DSRBasicCodedEntry("110142", "DCM", "Local Service Operation Stopped") +#define CODE_DCM_AuthenticationDecision DSRBasicCodedEntry("110143", "DCM", "Authentication Decision") +#define CODE_DCM_AuthorizationDecision DSRBasicCodedEntry("110144", "DCM", "Authorization Decision") +#define CODE_DCM_SessionStart DSRBasicCodedEntry("110145", "DCM", "Session start") +#define CODE_DCM_SessionStop DSRBasicCodedEntry("110146", "DCM", "Session stop") +#define CODE_DCM_AccessControlDecision DSRBasicCodedEntry("110147", "DCM", "Access Control Decision") #define CODE_DCM_Application DSRBasicCodedEntry("110150", "DCM", "Application") #define CODE_DCM_ApplicationLauncher DSRBasicCodedEntry("110151", "DCM", "Application Launcher") #define CODE_DCM_DestinationRoleID DSRBasicCodedEntry("110152", "DCM", "Destination Role ID") @@ -503,6 +510,8 @@ #define CODE_DCM_DiscontinuedProcedureStepRescheduled DSRBasicCodedEntry("110528", "DCM", "Discontinued Procedure Step rescheduled") #define CODE_DCM_DiscontinuedProcedureStepReschedulingRecommended DSRBasicCodedEntry("110529", "DCM", "Discontinued Procedure Step rescheduling recommended") #define CODE_DCM_WorkitemAssignmentRejectedByAssignedResource DSRBasicCodedEntry("110530", "DCM", "Workitem assignment rejected by assigned resource") +#define CODE_DCM_InsufficientQualityForInterpretation DSRBasicCodedEntry("110531", "DCM", "Insufficient quality for interpretation") +#define CODE_DCM_InterpretationRequiresSpecialistExpertise DSRBasicCodedEntry("110532", "DCM", "Interpretation requires specialist expertise") #define CODE_DCM_VentralDiencephalon DSRBasicCodedEntry("110700", "DCM", "Ventral Diencephalon") #define CODE_DCM_WhiteMatterT1Hypointensity DSRBasicCodedEntry("110701", "DCM", "White Matter T1 Hypointensity") #define CODE_DCM_WhiteMatterT2Hyperintensity DSRBasicCodedEntry("110702", "DCM", "White Matter T2 Hyperintensity") @@ -1748,6 +1757,7 @@ #define CODE_DCM_RetainDeviceIdentityOption DSRBasicCodedEntry("113109", "DCM", "Retain Device Identity Option") #define CODE_DCM_RetainUIDsOption DSRBasicCodedEntry("113110", "DCM", "Retain UIDs Option") #define CODE_DCM_RetainSafePrivateOption DSRBasicCodedEntry("113111", "DCM", "Retain Safe Private Option") +#define CODE_DCM_RetainInstitutionIdentityOption DSRBasicCodedEntry("113112", "DCM", "Retain Institution Identity Option") #define CODE_DCM_PredecessorContainingGroupOfImagingSubjects DSRBasicCodedEntry("113130", "DCM", "Predecessor containing group of imaging subjects") #define CODE_DCM_ExtractionOfIndividualSubjectFromGroup DSRBasicCodedEntry("113131", "DCM", "Extraction of individual subject from group") #define CODE_DCM_SingleSubjectSelectedFromGroup DSRBasicCodedEntry("113132", "DCM", "Single subject selected from group") @@ -1784,6 +1794,36 @@ #define CODE_DCM_DOT DSRBasicCodedEntry("113236", "DCM", "DOT") #define CODE_DCM_PAS DSRBasicCodedEntry("113237", "DCM", "PAS") #define CODE_DCM_SphericalDeconvolution DSRBasicCodedEntry("113238", "DCM", "Spherical Deconvolution") +#define CODE_DCM_SourceImageDiffusionBValue DSRBasicCodedEntry("113240", "DCM", "Source image diffusion b-value") +#define CODE_DCM_ModelFittingMethod DSRBasicCodedEntry("113241", "DCM", "Model fitting method") +#define CODE_DCM_MonoExponentialDiffusionModel DSRBasicCodedEntry("113250", "DCM", "Mono-exponential diffusion model") +#define CODE_DCM_BiExponential_IVIM_diffusionModel DSRBasicCodedEntry("113251", "DCM", "Bi-exponential (IVIM) diffusion model") +#define CODE_DCM_KurtosisDiffusionModel DSRBasicCodedEntry("113252", "DCM", "Kurtosis diffusion model") +#define CODE_DCM_GammaDistributionModel DSRBasicCodedEntry("113253", "DCM", "Gamma distribution model") +#define CODE_DCM_StretchedExponentialDiffusionModel DSRBasicCodedEntry("113254", "DCM", "Stretched exponential diffusion model") +#define CODE_DCM_TruncatedGaussianDiffusionModel DSRBasicCodedEntry("113255", "DCM", "Truncated Gaussian diffusion model") +#define CODE_DCM_LogOfRatioOfTwoSamples DSRBasicCodedEntry("113260", "DCM", "Log of ratio of two samples") +#define CODE_DCM_LeastSquaresFitOfMultipleSamples DSRBasicCodedEntry("113261", "DCM", "Least squares fit of multiple samples") +#define CODE_DCM_LevenbergMarquardt DSRBasicCodedEntry("113265", "DCM", "Levenberg-Marquardt") +#define CODE_DCM_TrustRegion DSRBasicCodedEntry("113266", "DCM", "Trust-Region") +#define CODE_DCM_FixedDp DSRBasicCodedEntry("113267", "DCM", "Fixed-Dp") +#define CODE_DCM_SegmentedUnconstrained DSRBasicCodedEntry("113268", "DCM", "Segmented-Unconstrained") +#define CODE_DCM_SegmentedConstrained DSRBasicCodedEntry("113269", "DCM", "Segmented-Constrained") +#define CODE_DCM_BayesianProbability DSRBasicCodedEntry("113270", "DCM", "Bayesian-Probability") +#define CODE_DCM_DotDotDot DSRBasicCodedEntry("...", "DCM", "...") +#define CODE_DCM_VoxelwiseSelectionOfBValue DSRBasicCodedEntry("113285", "DCM", "Voxelwise selection of b-value") +#define CODE_DCM_VolumeRatio DSRBasicCodedEntry("113288", "DCM", "Volume Ratio") +#define CODE_DCM_DiffusionCoefficient DSRBasicCodedEntry("113289", "DCM", "Diffusion Coefficient") +#define CODE_DCM_MonoExponentialApparentDiffusionCoefficient DSRBasicCodedEntry("113290", "DCM", "Mono-exponential Apparent Diffusion Coefficient") +#define CODE_DCM_SlowDiffusionCoefficient DSRBasicCodedEntry("113291", "DCM", "Slow Diffusion Coefficient") +#define CODE_DCM_FastDiffusionCoefficient DSRBasicCodedEntry("113292", "DCM", "Fast Diffusion Coefficient") +#define CODE_DCM_FastDiffusionCoefficientFraction DSRBasicCodedEntry("113293", "DCM", "Fast Diffusion Coefficient Fraction") +#define CODE_DCM_KurtosisDiffusionCoefficient DSRBasicCodedEntry("113294", "DCM", "Kurtosis Diffusion Coefficient") +#define CODE_DCM_GammaDistributionScaleParameter DSRBasicCodedEntry("113295", "DCM", "Gamma Distribution Scale Parameter") +#define CODE_DCM_GammaDistributionShapeParameter DSRBasicCodedEntry("113296", "DCM", "Gamma Distribution Shape Parameter") +#define CODE_DCM_GammaDistributionMode DSRBasicCodedEntry("113297", "DCM", "Gamma Distribution Mode") +#define CODE_DCM_DistributedDiffusionCoefficient DSRBasicCodedEntry("113298", "DCM", "Distributed Diffusion Coefficient") +#define CODE_DCM_AnomalousExponentParameter DSRBasicCodedEntry("113299", "DCM", "Anomalous Exponent Parameter") #define CODE_DCM_RadiopharmaceuticalRadiationDoseReport DSRBasicCodedEntry("113500", "DCM", "Radiopharmaceutical Radiation Dose Report") #define CODE_DCM_RadiopharmaceuticalAdministration DSRBasicCodedEntry("113502", "DCM", "Radiopharmaceutical Administration") #define CODE_DCM_RadiopharmaceuticalAdministrationEventUID DSRBasicCodedEntry("113503", "DCM", "Radiopharmaceutical Administration Event UID") @@ -2067,6 +2107,7 @@ #define CODE_DCM_ReconstructionAlgorithm DSRBasicCodedEntry("113961", "DCM", "Reconstruction Algorithm") #define CODE_DCM_FilteredBackProjection DSRBasicCodedEntry("113962", "DCM", "Filtered Back Projection") #define CODE_DCM_IterativeReconstruction DSRBasicCodedEntry("113963", "DCM", "Iterative Reconstruction") +#define CODE_DCM_AtSurfaceOfPatient DSRBasicCodedEntry("113964", "DCM", "At Surface of Patient") #define CODE_DCM_ProcedureStepToThisPoint DSRBasicCodedEntry("113970", "DCM", "Procedure Step To This Point") #define CODE_DCM_WaterEquivalentDiameter DSRBasicCodedEntry("113980", "DCM", "Water Equivalent Diameter") #define CODE_DCM_WaterEquivalentDiameterRepresentativeValue DSRBasicCodedEntry("113981", "DCM", "Water Equivalent Diameter Representative Value") @@ -2523,7 +2564,7 @@ #define CODE_DCM_PostInterventionTIMIFlow DSRBasicCodedEntry("122110", "DCM", "Post-Intervention TIMI Flow") #define CODE_DCM_PrimaryInterventionDevice DSRBasicCodedEntry("122111", "DCM", "Primary Intervention Device") #define CODE_DCM_NormalMyocardium DSRBasicCodedEntry("122112", "DCM", "Normal Myocardium") -#define CODE_DCM_SacrredMyocardial DSRBasicCodedEntry("122113", "DCM", "Sacrred Myocardial") +#define CODE_DCM_ScarredMyocardium DSRBasicCodedEntry("122113", "DCM", "Scarred Myocardium") #define CODE_DCM_ThinningMyocardium DSRBasicCodedEntry("122114", "DCM", "Thinning Myocardium") #define CODE_DCM_HemodynamicsReport DSRBasicCodedEntry("122120", "DCM", "Hemodynamics Report") #define CODE_DCM_AtrialPressureMeasurements DSRBasicCodedEntry("122121", "DCM", "Atrial pressure measurements") @@ -2897,7 +2938,7 @@ #define CODE_DCM_LateContrastEnhancement DSRBasicCodedEntry("122664", "DCM", "Late Contrast Enhancement") #define CODE_DCM_TimeIntervalSinceInjectionOfContrastMedia DSRBasicCodedEntry("122665", "DCM", "Time interval since injection of contrast media") #define CODE_DCM_TimeRelativeToRWavePeak DSRBasicCodedEntry("122666", "DCM", "Time relative to R-wave peak") -#define CODE_DCM_BloodVelocityVsdotTimeOfCardiacCycle DSRBasicCodedEntry("122667", "DCM", "Blood velocity vs. time of cardiac cycle") +#define CODE_DCM_BloodVelocityVsTimeOfCardiacCycle DSRBasicCodedEntry("122667", "DCM", "Blood velocity vs. time of cardiac cycle") #define CODE_DCM_TimeIntervalSinceDetectionOfContrastBolus DSRBasicCodedEntry("122668", "DCM", "Time interval since detection of contrast bolus") #define CODE_DCM_PapillaryMuscleIncludedExcluded DSRBasicCodedEntry("122670", "DCM", "Papillary Muscle Included/Excluded") #define CODE_DCM_AnteriorPosterior DSRBasicCodedEntry("122675", "DCM", "Anterior-Posterior") @@ -3169,14 +3210,14 @@ #define CODE_DCM_FractalDimension DSRBasicCodedEntry("126050", "DCM", "Fractal Dimension") #define CODE_DCM_Skewness DSRBasicCodedEntry("126051", "DCM", "Skewness") #define CODE_DCM_Kurtosis DSRBasicCodedEntry("126052", "DCM", "Kurtosis") -#define CODE_DCM_EntropyOfGLCM DSRBasicCodedEntry("126060", "DCM", "Entropy of GLCM") -#define CODE_DCM_EnergyOfGLCM DSRBasicCodedEntry("126061", "DCM", "Energy of GLCM") -#define CODE_DCM_HomogeneityOfGLCM DSRBasicCodedEntry("126062", "DCM", "Homogeneity of GLCM") +#define CODE_DCM_JointEntropyOfGLCM DSRBasicCodedEntry("126060", "DCM", "Joint Entropy of GLCM") +#define CODE_DCM_RootAngularSecondMomentOfGLCM DSRBasicCodedEntry("126061", "DCM", "Root Angular Second Moment of GLCM") +#define CODE_DCM_InverseDifferenceMomentOfGLCM DSRBasicCodedEntry("126062", "DCM", "Inverse Difference Moment of GLCM") #define CODE_DCM_ContrastOfGLCM DSRBasicCodedEntry("126063", "DCM", "Contrast of GLCM") #define CODE_DCM_DissimilarityOfGLCM DSRBasicCodedEntry("126064", "DCM", "Dissimilarity of GLCM") -#define CODE_DCM_ASMOfGLCM DSRBasicCodedEntry("126065", "DCM", "ASM of GLCM") +#define CODE_DCM_AngularSecondMomentOfGLCM DSRBasicCodedEntry("126065", "DCM", "Angular Second Moment of GLCM") #define CODE_DCM_CorrelationOfGLCM DSRBasicCodedEntry("126066", "DCM", "Correlation of GLCM") -#define CODE_DCM_GrayLevelCoOccurrenceMatrix_GLCM DSRBasicCodedEntry("126067", "DCM", "Gray Level Co-occurrence Matrix (GLCM)") +#define CODE_DCM_GrayLevelCoOccurrenceMatrix DSRBasicCodedEntry("126067", "DCM", "Gray Level Co-occurrence Matrix") #define CODE_DCM_SubjectTimePointIdentifier DSRBasicCodedEntry("126070", "DCM", "Subject Time Point Identifier") #define CODE_DCM_ProtocolTimePointIdentifier DSRBasicCodedEntry("126071", "DCM", "Protocol Time Point Identifier") #define CODE_DCM_TimePointType DSRBasicCodedEntry("126072", "DCM", "Time Point Type") @@ -3191,6 +3232,10 @@ #define CODE_DCM_AcquisitionTime DSRBasicCodedEntry("126202", "DCM", "Acquisition Time") #define CODE_DCM_PETRadionuclideIncubationTime DSRBasicCodedEntry("126203", "DCM", "PET Radionuclide Incubation Time") #define CODE_DCM_R2Coefficient DSRBasicCodedEntry("126220", "DCM", "R2-Coefficient") +#define CODE_DCM_ChiSquare DSRBasicCodedEntry("126221", "DCM", "Chi-square") +#define CODE_DCM_DW DSRBasicCodedEntry("126222", "DCM", "D-W") +#define CODE_DCM_AIC DSRBasicCodedEntry("126223", "DCM", "AIC") +#define CODE_DCM_BIC DSRBasicCodedEntry("126224", "DCM", "BIC") #define CODE_DCM_PerfusionAnalysisByStableXenonCTTechnique DSRBasicCodedEntry("126300", "DCM", "Perfusion analysis by Stable Xenon CT technique") #define CODE_DCM_PerfusionAnalysisByIVIodinatedContrastCTTechnique DSRBasicCodedEntry("126301", "DCM", "Perfusion analysis by IV Iodinated Contrast CT technique") #define CODE_DCM_PerfusionAnalysisByArterialSpinLabelingMRTechnique DSRBasicCodedEntry("126302", "DCM", "Perfusion analysis by Arterial Spin Labeling MR technique") @@ -3259,7 +3304,7 @@ #define CODE_DCM_PittsburghCompoundB_C11 DSRBasicCodedEntry("126500", "DCM", "Pittsburgh compound B C^11^") #define CODE_DCM_Florbetaben_F18 DSRBasicCodedEntry("126501", "DCM", "Florbetaben F^18^") #define CODE_DCM_T807_F18 DSRBasicCodedEntry("126502", "DCM", "T807 F^18^") -#define CODE_DCM_Flubatine_F18_126503 DSRBasicCodedEntry("126503", "DCM", "Flubatine F^18^") +#define CODE_DCM_Flubatine_F18 DSRBasicCodedEntry("126503", "DCM", "Flubatine F^18^") #define CODE_DCM_MonoclonalAntibody_mAb_64Cu DSRBasicCodedEntry("126510", "DCM", "Monoclonal Antibody (mAb) ^64^Cu") #define CODE_DCM_MonoclonalAntibody_mAb_89Zr DSRBasicCodedEntry("126511", "DCM", "Monoclonal Antibody (mAb) ^89^Zr") #define CODE_DCM_Trastuzumab_89Zr DSRBasicCodedEntry("126512", "DCM", "Trastuzumab ^89^Zr") @@ -3291,11 +3336,13 @@ #define CODE_DCM_Glutamine_C11 DSRBasicCodedEntry("126709", "DCM", "Glutamine C^11^") #define CODE_DCM_Glutamine_C14 DSRBasicCodedEntry("126710", "DCM", "Glutamine C^14^") #define CODE_DCM_Glutamine_F18 DSRBasicCodedEntry("126711", "DCM", "Glutamine F^18^") -#define CODE_DCM_Flubatine_F18_126712 DSRBasicCodedEntry("126712", "DCM", "Flubatine F^18^") +#define CODE_DCM_RETIRED_Flubatine_F18 DSRBasicCodedEntry("126712", "DCM", "Flubatine F^18^") #define CODE_DCM_2FA_F18 DSRBasicCodedEntry("126713", "DCM", "2FA F^18^") #define CODE_DCM_Nifene_F18 DSRBasicCodedEntry("126714", "DCM", "Nifene F^18^") #define CODE_DCM_CLR1404_I124 DSRBasicCodedEntry("126715", "DCM", "CLR1404 I^124^") #define CODE_DCM_CLR1404_I131 DSRBasicCodedEntry("126716", "DCM", "CLR1404 I^131^") +#define CODE_DCM_THK5351_F18 DSRBasicCodedEntry("126717", "DCM", "THK5351 F^18^") +#define CODE_DCM_Flurpiridaz_F18 DSRBasicCodedEntry("126718", "DCM", "Flurpiridaz F^18^") #define CODE_DCM_Obinituzimab_89Zr DSRBasicCodedEntry("126721", "DCM", "Obinituzimab ^89^Zr") #define CODE_DCM_Benralizumab_89Zr DSRBasicCodedEntry("126722", "DCM", "Benralizumab ^89^Zr") #define CODE_DCM_Ocaratuzumab_89Zr DSRBasicCodedEntry("126723", "DCM", "Ocaratuzumab ^89^Zr") @@ -3562,6 +3609,305 @@ #define CODE_DCM_SourceMeasurement DSRBasicCodedEntry("128224", "DCM", "Source measurement") #define CODE_DCM_SourceReport DSRBasicCodedEntry("128225", "DCM", "Source report") #define CODE_DCM_SourceRawData DSRBasicCodedEntry("128226", "DCM", "Source raw data") +#define CODE_DCM_SourceRealWorldValueMap DSRBasicCodedEntry("128227", "DCM", "Source real world value map") #define CODE_DCM_PulseSequenceName DSRBasicCodedEntry("128230", "DCM", "Pulse Sequence Name") +#define CODE_DCM_StructuralImageForImageProcessing DSRBasicCodedEntry("128250", "DCM", "Structural image for image processing") +#define CODE_DCM_FlowImageForImageProcessing DSRBasicCodedEntry("128251", "DCM", "Flow image for image processing") +#define CODE_DCM_OCTAAmplitudeDecorrelation DSRBasicCodedEntry("128252", "DCM", "OCT-A amplitude decorrelation") +#define CODE_DCM_OCTAComplexVariance DSRBasicCodedEntry("128253", "DCM", "OCT-A complex variance") +#define CODE_DCM_OCTASpeckleVariance DSRBasicCodedEntry("128254", "DCM", "OCT-A speckle variance") +#define CODE_DCM_OCTACorrelationMapping DSRBasicCodedEntry("128255", "DCM", "OCT-A correlation mapping") +#define CODE_DCM_DopplerOCTA DSRBasicCodedEntry("128256", "DCM", "Doppler OCT-A") +#define CODE_DCM_RetinaDepthEncodedVasculatureFlow DSRBasicCodedEntry("128257", "DCM", "Retina depth encoded vasculature flow") +#define CODE_DCM_RetinaDepthEncodedStructuralReflectanceMap DSRBasicCodedEntry("128258", "DCM", "Retina depth encoded structural reflectance map") +#define CODE_DCM_RetinaVasculatureFlow DSRBasicCodedEntry("128259", "DCM", "Retina vasculature flow") +#define CODE_DCM_RetinaStructuralReflectanceMap DSRBasicCodedEntry("128260", "DCM", "Retina structural reflectance map") +#define CODE_DCM_VitreousVasculatureFlow DSRBasicCodedEntry("128261", "DCM", "Vitreous vasculature flow") +#define CODE_DCM_VitreousStructuralReflectanceMap DSRBasicCodedEntry("128262", "DCM", "Vitreous structural reflectance map") +#define CODE_DCM_RadialPeripapillaryVasculatureFlow DSRBasicCodedEntry("128263", "DCM", "Radial peripapillary vasculature flow") +#define CODE_DCM_RadialPeripapillaryStructuralReflectanceMap DSRBasicCodedEntry("128264", "DCM", "Radial peripapillary structural reflectance map") +#define CODE_DCM_SuperficialRetinaVasculatureFlow DSRBasicCodedEntry("128265", "DCM", "Superficial retina vasculature flow") +#define CODE_DCM_SuperficialRetinaStructuralReflectanceMap DSRBasicCodedEntry("128266", "DCM", "Superficial retina structural reflectance map") +#define CODE_DCM_MiddleInnerRetinaVasculatureFlow DSRBasicCodedEntry("128267", "DCM", "Middle inner retina vasculature flow") +#define CODE_DCM_MiddleInnerStructuralReflectanceMap DSRBasicCodedEntry("128268", "DCM", "Middle inner structural reflectance map") +#define CODE_DCM_DeepRetinaVasculatureFlow DSRBasicCodedEntry("128269", "DCM", "Deep retina vasculature flow") +#define CODE_DCM_DeepRetinaStructuralReflectanceMap DSRBasicCodedEntry("128270", "DCM", "Deep retina structural reflectance map") +#define CODE_DCM_OuterRetinaVasculatureFlow DSRBasicCodedEntry("128271", "DCM", "Outer retina vasculature flow") +#define CODE_DCM_OuterRetinaStructuralReflectanceMap DSRBasicCodedEntry("128272", "DCM", "Outer retina structural reflectance map") +#define CODE_DCM_ChoriocapillarisVasculatureFlow DSRBasicCodedEntry("128273", "DCM", "Choriocapillaris vasculature flow") +#define CODE_DCM_ChoriocapillarisStructuralReflectanceMap DSRBasicCodedEntry("128274", "DCM", "Choriocapillaris structural reflectance map") +#define CODE_DCM_ChoroidVasculatureFlow DSRBasicCodedEntry("128275", "DCM", "Choroid vasculature flow") +#define CODE_DCM_ChoroidStructuralReflectanceMap DSRBasicCodedEntry("128276", "DCM", "Choroid structural reflectance map") +#define CODE_DCM_WholeEyeVasculatureFlow DSRBasicCodedEntry("128277", "DCM", "Whole eye vasculature flow") +#define CODE_DCM_WholeEyeStructuralReflectanceMap DSRBasicCodedEntry("128278", "DCM", "Whole eye structural reflectance map") +#define CODE_DCM_CubeBScanPattern DSRBasicCodedEntry("128279", "DCM", "Cube B-scan pattern") +#define CODE_DCM_RasterBScanPattern DSRBasicCodedEntry("128280", "DCM", "Raster B-scan pattern") +#define CODE_DCM_LineBScanPattern DSRBasicCodedEntry("128281", "DCM", "Line B-scan pattern") +#define CODE_DCM_RadialBScanPattern DSRBasicCodedEntry("128282", "DCM", "Radial B-scan pattern") +#define CODE_DCM_CrossBScanPattern DSRBasicCodedEntry("128283", "DCM", "Cross B-scan pattern") +#define CODE_DCM_CircleBScanPattern DSRBasicCodedEntry("128284", "DCM", "Circle B-scan pattern") +#define CODE_DCM_ConcentricCircleBScanPattern DSRBasicCodedEntry("128285", "DCM", "Concentric circle B-scan pattern") +#define CODE_DCM_CircleRasterBScanPattern DSRBasicCodedEntry("128286", "DCM", "Circle-raster B-scan pattern") +#define CODE_DCM_CircleRadialBScanPattern DSRBasicCodedEntry("128287", "DCM", "Circle-radial B-scan pattern") +#define CODE_DCM_GridBScanPattern DSRBasicCodedEntry("128288", "DCM", "Grid B-scan pattern") +#define CODE_DCM_OuterSurfaceOfRNFL DSRBasicCodedEntry("128289", "DCM", "Outer surface of RNFL") +#define CODE_DCM_OuterSurfaceOfGCL DSRBasicCodedEntry("128290", "DCM", "Outer surface of GCL") +#define CODE_DCM_OuterSurfaceOfIPL DSRBasicCodedEntry("128291", "DCM", "Outer surface of IPL") +#define CODE_DCM_OuterSurfaceOfINL DSRBasicCodedEntry("128292", "DCM", "Outer surface of INL") +#define CODE_DCM_OuterSurfaceOfOPL DSRBasicCodedEntry("128293", "DCM", "Outer surface of OPL") +#define CODE_DCM_OuterSurfaceOfHFL DSRBasicCodedEntry("128294", "DCM", "Outer surface of HFL") +#define CODE_DCM_SurfaceBetweenInnerAndOuterSegmentsOfThePhotoreceptors DSRBasicCodedEntry("128295", "DCM", "Surface between Inner and Outer Segments of the photoreceptors") +#define CODE_DCM_SurfaceOfTheInterdigitatingZoneBetweenRetinaAndRPE DSRBasicCodedEntry("128296", "DCM", "Surface of the interdigitating zone between retina and RPE") +#define CODE_DCM_AnteriorSurfaceOfTheRPE DSRBasicCodedEntry("128297", "DCM", "Anterior surface of the RPE") +#define CODE_DCM_SurfaceOfTheCenterOfTheRPE DSRBasicCodedEntry("128298", "DCM", "Surface of the center of the RPE") +#define CODE_DCM_PosteriorSurfaceOfTheRPE DSRBasicCodedEntry("128299", "DCM", "Posterior surface of the RPE") +#define CODE_DCM_OuterSurfaceOfTheBM DSRBasicCodedEntry("128300", "DCM", "Outer surface of the BM") +#define CODE_DCM_SurfaceOfTheChoroidScleraInterface DSRBasicCodedEntry("128301", "DCM", "Surface of the choroid-sclera interface") +#define CODE_DCM_OuterSurfaceOfTheCC DSRBasicCodedEntry("128302", "DCM", "Outer surface of the CC") +#define CODE_DCM_OCTBScanAnalysis DSRBasicCodedEntry("128303", "DCM", "OCT B-scan analysis") +#define CODE_DCM_PatientRadiationDoseReport DSRBasicCodedEntry("128401", "DCM", "Patient Radiation Dose Report") +#define CODE_DCM_RadiationDoseEstimate DSRBasicCodedEntry("128402", "DCM", "Radiation Dose Estimate") +#define CODE_DCM_RadiationDoseEstimateName DSRBasicCodedEntry("128403", "DCM", "Radiation Dose Estimate Name") +#define CODE_DCM_AnthropomorphicModel DSRBasicCodedEntry("128404", "DCM", "Anthropomorphic Model") +#define CODE_DCM_BreastThickness DSRBasicCodedEntry("128405", "DCM", "Breast Thickness") +#define CODE_DCM_BREPRadiationTransportModel DSRBasicCodedEntry("128406", "DCM", "BREP Radiation Transport Model") +#define CODE_DCM_DgN DSRBasicCodedEntry("128407", "DCM", "DgN") +#define CODE_DCM_PatientAPDimension DSRBasicCodedEntry("128408", "DCM", "Patient AP Dimension") +#define CODE_DCM_PatientLateralDimension DSRBasicCodedEntry("128409", "DCM", "Patient Lateral Dimension") +#define CODE_DCM_SSDEConversionFactor DSRBasicCodedEntry("128410", "DCM", "SSDE Conversion Factor") +#define CODE_DCM_Backscatter DSRBasicCodedEntry("128411", "DCM", "Backscatter") +#define CODE_DCM_RadiationDoseEstimateRepresentation DSRBasicCodedEntry("128412", "DCM", "Radiation Dose Estimate Representation") +#define CODE_DCM_DistributionRepresentation DSRBasicCodedEntry("128413", "DCM", "Distribution Representation") +#define CODE_DCM_RadiationDoseRepresentationData DSRBasicCodedEntry("128414", "DCM", "Radiation Dose Representation Data") +#define CODE_DCM_RadiationDoseEstimateMethodology DSRBasicCodedEntry("128415", "DCM", "Radiation Dose Estimate Methodology") +#define CODE_DCM_SRInstanceUsed DSRBasicCodedEntry("128416", "DCM", "SR Instance Used") +#define CODE_DCM_PatientModelType DSRBasicCodedEntry("128417", "DCM", "Patient Model Type") +#define CODE_DCM_SimpleObjectModel DSRBasicCodedEntry("128418", "DCM", "Simple Object Model") +#define CODE_DCM_RadiationTransportModelType DSRBasicCodedEntry("128420", "DCM", "Radiation Transport Model Type") +#define CODE_DCM_GeometricRadiationTransportModel DSRBasicCodedEntry("128421", "DCM", "Geometric Radiation Transport Model") +#define CODE_DCM_VoxelizedRadiationTransportModel DSRBasicCodedEntry("128422", "DCM", "Voxelized Radiation Transport Model") +#define CODE_DCM_MeshRadiationTransportModel DSRBasicCodedEntry("128423", "DCM", "Mesh Radiation Transport Model") +#define CODE_DCM_NURBSRadiationTransportModel DSRBasicCodedEntry("128424", "DCM", "NURBS Radiation Transport Model") +#define CODE_DCM_PatientRadiationDoseModelData DSRBasicCodedEntry("128425", "DCM", "Patient Radiation Dose Model Data") +#define CODE_DCM_PatientRadiationDoseModelReference DSRBasicCodedEntry("128426", "DCM", "Patient Radiation Dose Model Reference") +#define CODE_DCM_PatientModelDemographics DSRBasicCodedEntry("128427", "DCM", "Patient Model Demographics") +#define CODE_DCM_ModelMinimumAge DSRBasicCodedEntry("128428", "DCM", "Model Minimum Age") +#define CODE_DCM_EventUIDUsed DSRBasicCodedEntry("128429", "DCM", "Event UID Used") +#define CODE_DCM_ModelMaximumAge DSRBasicCodedEntry("128430", "DCM", "Model Maximum Age") +#define CODE_DCM_BeamBlock DSRBasicCodedEntry("128431", "DCM", "Beam Block") +#define CODE_DCM_TissueAirRatio DSRBasicCodedEntry("128433", "DCM", "Tissue Air Ratio") +#define CODE_DCM_RadiationDoseEstimateParameters DSRBasicCodedEntry("128434", "DCM", "Radiation Dose Estimate Parameters") +#define CODE_DCM_RadiationDoseCompositeParameters DSRBasicCodedEntry("128436", "DCM", "Radiation Dose Composite Parameters") +#define CODE_DCM_ModelPatientSex DSRBasicCodedEntry("128437", "DCM", "Model Patient Sex") +#define CODE_DCM_ModelMinimumWeight DSRBasicCodedEntry("128438", "DCM", "Model Minimum Weight") +#define CODE_DCM_ModelMinimumHeight DSRBasicCodedEntry("128439", "DCM", "Model Minimum Height") +#define CODE_DCM_ModelMaximumWeight DSRBasicCodedEntry("128441", "DCM", "Model Maximum Weight") +#define CODE_DCM_ModelMaximumHeight DSRBasicCodedEntry("128442", "DCM", "Model Maximum Height") +#define CODE_DCM_SpatialRegistrationReference DSRBasicCodedEntry("128444", "DCM", "Spatial Registration Reference") +#define CODE_DCM_RegistrationMethod DSRBasicCodedEntry("128446", "DCM", "Registration Method") +#define CODE_DCM_SpatialFiducials DSRBasicCodedEntry("128447", "DCM", "Spatial Fiducials") +#define CODE_DCM_CorrectionFactor DSRBasicCodedEntry("128452", "DCM", "Correction Factor") +#define CODE_DCM_CurveFitParameter DSRBasicCodedEntry("128453", "DCM", "Curve Fit Parameter") +#define CODE_DCM_HomogeneityFactor DSRBasicCodedEntry("128455", "DCM", "Homogeneity Factor") +#define CODE_DCM_PatientModelRegistration DSRBasicCodedEntry("128456", "DCM", "Patient Model Registration") +#define CODE_DCM_XRayBeamAttenuator DSRBasicCodedEntry("128457", "DCM", "X-Ray Beam Attenuator") +#define CODE_DCM_AttenuatorCategory DSRBasicCodedEntry("128458", "DCM", "Attenuator Category") +#define CODE_DCM_Table DSRBasicCodedEntry("128459", "DCM", "Table") +#define CODE_DCM_TableCore DSRBasicCodedEntry("128460", "DCM", "Table Core") +#define CODE_DCM_TableOuterLiner DSRBasicCodedEntry("128461", "DCM", "Table Outer Liner") +#define CODE_DCM_TablePad DSRBasicCodedEntry("128462", "DCM", "Table Pad") +#define CODE_DCM_RadiationDoseEstimationParameterType DSRBasicCodedEntry("128464", "DCM", "Radiation Dose Estimation Parameter Type") +#define CODE_DCM_EquivalentAttenuatorMaterial DSRBasicCodedEntry("128465", "DCM", "Equivalent Attenuator Material") +#define CODE_DCM_AttenuatorDescription DSRBasicCodedEntry("128468", "DCM", "Attenuator Description") +#define CODE_DCM_EquivalentAttenuatorThickness DSRBasicCodedEntry("128469", "DCM", "Equivalent Attenuator Thickness") +#define CODE_DCM_XRayAttenuatorModelData DSRBasicCodedEntry("128470", "DCM", "X-Ray Attenuator Model Data") +#define CODE_DCM_XRayBeamAttenuatorModel DSRBasicCodedEntry("128472", "DCM", "X-Ray Beam Attenuator Model") +#define CODE_DCM_XRayBeamAttenuatorModelReference DSRBasicCodedEntry("128474", "DCM", "X-Ray Beam Attenuator Model Reference") +#define CODE_DCM_XRayBeamAttenuatorModelRegistration DSRBasicCodedEntry("128475", "DCM", "X-Ray Beam Attenuator Model Registration") +#define CODE_DCM_RadiationDoseEstimateMethod DSRBasicCodedEntry("128476", "DCM", "Radiation Dose Estimate Method") +#define CODE_DCM_RadiationDoseEstimateMethodType DSRBasicCodedEntry("128477", "DCM", "Radiation Dose Estimate Method Type") +#define CODE_DCM_TabularDataAlgorithm DSRBasicCodedEntry("128479", "DCM", "Tabular Data Algorithm") +#define CODE_DCM_AnalyticalAlgorithm DSRBasicCodedEntry("128480", "DCM", "Analytical Algorithm") +#define CODE_DCM_EmpiricalAlgorithm DSRBasicCodedEntry("128481", "DCM", "Empirical Algorithm") +#define CODE_DCM_RadiationDoseEstimateMethodReference DSRBasicCodedEntry("128482", "DCM", "Radiation Dose Estimate Method Reference") +#define CODE_DCM_Isodose DSRBasicCodedEntry("128484", "DCM", "Isodose") +#define CODE_DCM_SkinDoseMap DSRBasicCodedEntry("128485", "DCM", "Skin Dose Map") +#define CODE_DCM_3DDoseMap DSRBasicCodedEntry("128487", "DCM", "3D Dose Map") +#define CODE_DCM_DoseGradient DSRBasicCodedEntry("128488", "DCM", "Dose Gradient") +#define CODE_DCM_PhysicalSupport DSRBasicCodedEntry("128492", "DCM", "Physical Support") +#define CODE_DCM_PatientSegmentedModel DSRBasicCodedEntry("128494", "DCM", "Patient Segmented Model") +#define CODE_DCM_DosePointCloud DSRBasicCodedEntry("128496", "DCM", "Dose Point Cloud") +#define CODE_DCM_MeasuredRadiationDose DSRBasicCodedEntry("128497", "DCM", "Measured Radiation Dose") +#define CODE_DCM_PatientRadiationDoseModel DSRBasicCodedEntry("128500", "DCM", "Patient Radiation Dose Model") +#define CODE_DCM_ReferenceToUncertaintyDeterminationMethod DSRBasicCodedEntry("128511", "DCM", "Reference to Uncertainty Determination Method") +#define CODE_DCM_EquivalentDose DSRBasicCodedEntry("128512", "DCM", "Equivalent Dose") +#define CODE_DCM_AbsorbedDose DSRBasicCodedEntry("128513", "DCM", "Absorbed Dose") +#define CODE_DCM_NormalizationFactor DSRBasicCodedEntry("128522", "DCM", "Normalization Factor") +#define CODE_DCM_OffsetFactor DSRBasicCodedEntry("128523", "DCM", "Offset Factor") +#define CODE_DCM_TissueFraction DSRBasicCodedEntry("128526", "DCM", "Tissue Fraction") +#define CODE_DCM_DistanceCorrection DSRBasicCodedEntry("128527", "DCM", "Distance Correction") +#define CODE_DCM_ConversionFactor DSRBasicCodedEntry("128528", "DCM", "Conversion Factor") +#define CODE_DCM_MaximumAbsorbedRadiationDose DSRBasicCodedEntry("128531", "DCM", "Maximum Absorbed Radiation Dose") +#define CODE_DCM_MinimumAbsorbedRadiationDose DSRBasicCodedEntry("128532", "DCM", "Minimum Absorbed Radiation Dose") +#define CODE_DCM_MeanAbsorbedRadiationDose DSRBasicCodedEntry("128533", "DCM", "Mean Absorbed Radiation Dose") +#define CODE_DCM_ModeAbsorbedRadiationDose DSRBasicCodedEntry("128534", "DCM", "Mode Absorbed Radiation Dose") +#define CODE_DCM_MaximumEquivalentRadiationDose DSRBasicCodedEntry("128535", "DCM", "Maximum Equivalent Radiation Dose") +#define CODE_DCM_MinimumEquivalentRadiationDose DSRBasicCodedEntry("128536", "DCM", "Minimum Equivalent Radiation Dose") +#define CODE_DCM_MeanEquivalentRadiationDose DSRBasicCodedEntry("128537", "DCM", "Mean Equivalent Radiation Dose") +#define CODE_DCM_ModeEquivalentRadiationDose DSRBasicCodedEntry("128538", "DCM", "Mode Equivalent Radiation Dose") +#define CODE_DCM_MedianAbsorbedRadiationDose DSRBasicCodedEntry("128539", "DCM", "Median Absorbed Radiation Dose") +#define CODE_DCM_MedianEquivalentRadiationDose DSRBasicCodedEntry("128540", "DCM", "Median Equivalent Radiation Dose") +#define CODE_DCM_IsRepeatedAcquisition DSRBasicCodedEntry("128551", "DCM", "Is Repeated Acquisition") +#define CODE_DCM_ReasonForRepeatingAcquisition DSRBasicCodedEntry("128552", "DCM", "Reason for Repeating Acquisition") +#define CODE_DCM_PatientMotion DSRBasicCodedEntry("128553", "DCM", "Patient motion") +#define CODE_DCM_SuboptimalContrastTiming DSRBasicCodedEntry("128554", "DCM", "Suboptimal contrast timing") +#define CODE_DCM_AppropriateForTheIndications DSRBasicCodedEntry("128601", "DCM", "Appropriate for the indications") +#define CODE_DCM_ConsistentWithLabelingOfTheDevice DSRBasicCodedEntry("128602", "DCM", "Consistent with labeling of the device") +#define CODE_DCM_ApprovedForUseAtTheInstitution DSRBasicCodedEntry("128603", "DCM", "Approved for use at the institution") +#define CODE_DCM_ApprovedForUseInTheClinicalTrial DSRBasicCodedEntry("128604", "DCM", "Approved for use in the clinical trial") +#define CODE_DCM_ApprovedForUseonPregnantPatients DSRBasicCodedEntry("128605", "DCM", "Approved for use on pregnant patients") +#define CODE_DCM_AppropriateForTheDevice DSRBasicCodedEntry("128606", "DCM", "Appropriate for the device") +#define CODE_DCM_InsideOperationalLimitsOfTheDevice DSRBasicCodedEntry("128607", "DCM", "Inside operational limits of the device") +#define CODE_DCM_OptimizedForTheDeviceInstance DSRBasicCodedEntry("128608", "DCM", "Optimized for the device instance") +#define CODE_DCM_DisapprovedForAnyUse DSRBasicCodedEntry("128609", "DCM", "Disapproved for any use") +#define CODE_DCM_DeprecatedProtocol DSRBasicCodedEntry("128610", "DCM", "Deprecated protocol") +#define CODE_DCM_ApprovedForExperimentalUse DSRBasicCodedEntry("128611", "DCM", "Approved for experimental use") +#define CODE_DCM_DisapprovedForExperimentalUse DSRBasicCodedEntry("128612", "DCM", "Disapproved for experimental use") +#define CODE_DCM_EligibleForReimbursement DSRBasicCodedEntry("128613", "DCM", "Eligible for reimbursement") +#define CODE_DCM_EligibleForReimbursementonPerPatientBasis DSRBasicCodedEntry("128614", "DCM", "Eligible for reimbursement on per patient basis") +#define CODE_DCM_IneligibleForReimbursement DSRBasicCodedEntry("128615", "DCM", "Ineligible for reimbursement") +#define CODE_DCM_DisapprovedForUseonPregnantPatients DSRBasicCodedEntry("128617", "DCM", "Disapproved for use on pregnant patients") +#define CODE_DCM_InappropriateForTheDevice DSRBasicCodedEntry("128618", "DCM", "Inappropriate for the device") +#define CODE_DCM_OutsideOperationalLimitsOfTheDevice DSRBasicCodedEntry("128619", "DCM", "Outside operational limits of the device") +#define CODE_DCM_NotOptimizedForTheDeviceInstance DSRBasicCodedEntry("128620", "DCM", "Not optimized for the device instance") +#define CODE_DCM_InappropriateForTheIndications DSRBasicCodedEntry("128621", "DCM", "Inappropriate for the indications") +#define CODE_DCM_InconsistentWithLabelingOfTheDevice DSRBasicCodedEntry("128622", "DCM", "Inconsistent with labeling of the device") +#define CODE_DCM_DisapprovedForUseAtTheInstitution DSRBasicCodedEntry("128623", "DCM", "Disapproved for use at the institution") +#define CODE_DCM_DisapprovedForUseInTheClinicalTrial DSRBasicCodedEntry("128624", "DCM", "Disapproved for use in the clinical trial") +#define CODE_DCM_HeadOfRadiology DSRBasicCodedEntry("128670", "DCM", "Head of Radiology") +#define CODE_DCM_ChairOfProtocolCommittee DSRBasicCodedEntry("128671", "DCM", "Chair of Protocol Committee") +#define CODE_DCM_AdministratorOfRadiologyDepartment DSRBasicCodedEntry("128673", "DCM", "Administrator of Radiology Department") +#define CODE_DCM_LeadRadiologicTechnologist DSRBasicCodedEntry("128674", "DCM", "Lead Radiologic Technologist") +#define CODE_DCM_HeadOfCardiology DSRBasicCodedEntry("128675", "DCM", "Head of Cardiology") +#define CODE_DCM_RepresentativeOfProtocolCommittee DSRBasicCodedEntry("128676", "DCM", "Representative of Protocol Committee") +#define CODE_DCM_RepresentativeOfEthicsCommittee DSRBasicCodedEntry("128677", "DCM", "Representative of Ethics Committee") +#define CODE_DCM_3DGel DSRBasicCodedEntry("128701", "DCM", "3D Gel") +#define CODE_DCM_DiodeArray DSRBasicCodedEntry("128702", "DCM", "Diode Array") +#define CODE_DCM_IonChamberArray DSRBasicCodedEntry("128703", "DCM", "Ion Chamber Array") +#define CODE_DCM_Diode DSRBasicCodedEntry("128704", "DCM", "Diode") +#define CODE_DCM_LiquidIonChamber DSRBasicCodedEntry("128705", "DCM", "Liquid Ion Chamber") +#define CODE_DCM_OSLD DSRBasicCodedEntry("128706", "DCM", "OSLD") +#define CODE_DCM_IonChamber DSRBasicCodedEntry("128707", "DCM", "Ion Chamber") +#define CODE_DCM_DiamondDetector DSRBasicCodedEntry("128708", "DCM", "Diamond Detector") +#define CODE_DCM_ForTeachingFileExport DSRBasicCodedEntry("128710", "DCM", "For Teaching File Export") +#define CODE_DCM_ForClinicalTrialExport DSRBasicCodedEntry("128711", "DCM", "For Clinical Trial Export") +#define CODE_DCM_AdditionalTeachingFileInformation DSRBasicCodedEntry("128712", "DCM", "Additional Teaching File Information") +#define CODE_DCM_ForResearchCollectionExport DSRBasicCodedEntry("128713", "DCM", "For Research Collection Export") +#define CODE_DCM_ForPublicationExport DSRBasicCodedEntry("128714", "DCM", "For Publication Export") +#define CODE_DCM_DelayExportUntilFinalReportIsAvailable DSRBasicCodedEntry("128715", "DCM", "Delay export until final report is available") +#define CODE_DCM_DelayExportUntilClinicalInformationIsAvailable DSRBasicCodedEntry("128716", "DCM", "Delay export until clinical information is available") +#define CODE_DCM_DelayExportUntilConfirmationOfDiagnosisIsAvailable DSRBasicCodedEntry("128717", "DCM", "Delay export until confirmation of diagnosis is available") +#define CODE_DCM_DelayExportUntilHistopathologyIsAvailable DSRBasicCodedEntry("128718", "DCM", "Delay export until histopathology is available") +#define CODE_DCM_DelayExportUntilOtherLaboratoryResultsAreAvailable DSRBasicCodedEntry("128719", "DCM", "Delay export until other laboratory results are available") +#define CODE_DCM_DelayExportUntilPatientIsDischarged DSRBasicCodedEntry("128720", "DCM", "Delay export until patient is discharged") +#define CODE_DCM_DelayExportUntilPatientDies DSRBasicCodedEntry("128721", "DCM", "Delay export until patient dies") +#define CODE_DCM_DelayExportUntilExpertReviewIsAvailable DSRBasicCodedEntry("128722", "DCM", "Delay export until expert review is available") +#define CODE_DCM_TeachingFileCategory DSRBasicCodedEntry("128723", "DCM", "Teaching File Category") +#define CODE_DCM_LevelOfDifficulty DSRBasicCodedEntry("128724", "DCM", "Level of Difficulty") +#define CODE_DCM_PrimaryLevel DSRBasicCodedEntry("128725", "DCM", "Primary level") +#define CODE_DCM_IntermediateLevel DSRBasicCodedEntry("128726", "DCM", "Intermediate level") +#define CODE_DCM_AdvancedLevel DSRBasicCodedEntry("128727", "DCM", "Advanced level") +#define CODE_DCM_MusculoskeletalImagingSubjectMatter DSRBasicCodedEntry("128728", "DCM", "Musculoskeletal imaging subject matter") +#define CODE_DCM_PulmonaryImagingSubjectMatter DSRBasicCodedEntry("128729", "DCM", "Pulmonary imaging subject matter") +#define CODE_DCM_CardiovascularImagingSubjectMatter DSRBasicCodedEntry("128730", "DCM", "Cardiovascular imaging subject matter") +#define CODE_DCM_GastrointestinalImagingSubjectMatter DSRBasicCodedEntry("128731", "DCM", "Gastrointestinal imaging subject matter") +#define CODE_DCM_GenitourinaryImagingSubjectMatter DSRBasicCodedEntry("128732", "DCM", "Genitourinary imaging subject matter") +#define CODE_DCM_NeuroimagingSubjectMatter DSRBasicCodedEntry("128733", "DCM", "Neuroimaging subject matter") +#define CODE_DCM_VascularAndInterventionalImagingSubjectMatter DSRBasicCodedEntry("128734", "DCM", "Vascular and interventional imaging subject matter") +#define CODE_DCM_NuclearMedicineImagingSubjectMatter DSRBasicCodedEntry("128735", "DCM", "Nuclear medicine imaging subject matter") +#define CODE_DCM_UltrasoundImagingSubjectMatter DSRBasicCodedEntry("128736", "DCM", "Ultrasound imaging subject matter") +#define CODE_DCM_PediatricImagingSubjectMatter DSRBasicCodedEntry("128737", "DCM", "Pediatric imaging subject matter") +#define CODE_DCM_BreastImagingSubjectMatter DSRBasicCodedEntry("128738", "DCM", "Breast imaging subject matter") +#define CODE_DCM_UDI DSRBasicCodedEntry("128739", "DCM", "UDI") +#define CODE_DCM_LongitudinalTemporalOffsetFromEvent DSRBasicCodedEntry("128740", "DCM", "Longitudinal Temporal Offset from Event") +#define CODE_DCM_LongitudinalTemporalEventType DSRBasicCodedEntry("128741", "DCM", "Longitudinal Temporal Event Type") +#define CODE_DCM_EquipmentLandmark DSRBasicCodedEntry("128750", "DCM", "Equipment Landmark") +#define CODE_DCM_CenterOfTableHead DSRBasicCodedEntry("128751", "DCM", "Center of Table Head") +#define CODE_DCM_EquipmentLandmarkXPosition DSRBasicCodedEntry("128752", "DCM", "Equipment Landmark X Position") +#define CODE_DCM_EquipmentLandmarkZPosition DSRBasicCodedEntry("128753", "DCM", "Equipment Landmark Z Position") +#define CODE_DCM_PatientLocationFiducial DSRBasicCodedEntry("128754", "DCM", "Patient Location Fiducial") +#define CODE_DCM_EquipmentLandmarkToPatientFiducialZDistance DSRBasicCodedEntry("128756", "DCM", "Equipment Landmark to Patient Fiducial Z Distance") +#define CODE_DCM_PositionerIsocenterPrimaryAngle DSRBasicCodedEntry("128757", "DCM", "Positioner Isocenter Primary Angle") +#define CODE_DCM_PositionerIsocenterSecondaryAngle DSRBasicCodedEntry("128758", "DCM", "Positioner Isocenter Secondary Angle") +#define CODE_DCM_PositionerIsocenterDetectorRotationAngle DSRBasicCodedEntry("128759", "DCM", "Positioner Isocenter Detector Rotation Angle") +#define CODE_DCM_PositionerIsocenterPrimaryEndAngle DSRBasicCodedEntry("128760", "DCM", "Positioner Isocenter Primary End Angle") +#define CODE_DCM_PositionerIsocenterSecondaryEndAngle DSRBasicCodedEntry("128761", "DCM", "Positioner Isocenter Secondary End Angle") +#define CODE_DCM_PositionerIsocenterDetectorRotationEndAngle DSRBasicCodedEntry("128762", "DCM", "Positioner Isocenter Detector Rotation End Angle") +#define CODE_DCM_TableHeadTiltEndAngle DSRBasicCodedEntry("128763", "DCM", "Table Head Tilt End Angle") +#define CODE_DCM_TableHorizontalRotationEndAngle DSRBasicCodedEntry("128764", "DCM", "Table Horizontal Rotation End Angle") +#define CODE_DCM_TableCradleTiltEndAngle DSRBasicCodedEntry("128765", "DCM", "Table Cradle Tilt End Angle") +#define CODE_DCM_TableXPositionToIsocenter DSRBasicCodedEntry("128766", "DCM", "Table X Position to Isocenter") +#define CODE_DCM_TableYPositionToIsocenter DSRBasicCodedEntry("128767", "DCM", "Table Y Position to Isocenter") +#define CODE_DCM_TableZPositionToIsocenter DSRBasicCodedEntry("128768", "DCM", "Table Z Position to Isocenter") +#define CODE_DCM_TableXEndPositionToIsocenter DSRBasicCodedEntry("128769", "DCM", "Table X End Position to Isocenter") +#define CODE_DCM_TableYEndPositionToIsocenter DSRBasicCodedEntry("128770", "DCM", "Table Y End Position to Isocenter") +#define CODE_DCM_TableZEndPositionToIsocenter DSRBasicCodedEntry("128771", "DCM", "Table Z End Position to Isocenter") +#define CODE_DCM_ReferenceBasis DSRBasicCodedEntry("128772", "DCM", "Reference Basis") +#define CODE_DCM_ReferenceGeometry DSRBasicCodedEntry("128773", "DCM", "Reference Geometry") +#define CODE_DCM_PersonObserverLoginName DSRBasicCodedEntry("128774", "DCM", "Person Observer's Login Name") +#define CODE_DCM_IdentifierWithinPersonObserverRole DSRBasicCodedEntry("128775", "DCM", "Identifier within Person Observer's Role") +#define CODE_DCM_GrayLevelRunLengthMatrix DSRBasicCodedEntry("128776", "DCM", "Gray Level Run Length Matrix") +#define CODE_DCM_GrayLevelSizeZoneMatrix DSRBasicCodedEntry("128777", "DCM", "Gray Level Size Zone Matrix") +#define CODE_DCM_JointMaximumOfGLCM DSRBasicCodedEntry("128781", "DCM", "Joint Maximum of GLCM") +#define CODE_DCM_JointAverageOfGLCM DSRBasicCodedEntry("128782", "DCM", "Joint Average of GLCM") +#define CODE_DCM_JointVarianceOfGLCM DSRBasicCodedEntry("128783", "DCM", "Joint Variance of GLCM") +#define CODE_DCM_DifferenceAverageOfGLCM DSRBasicCodedEntry("128784", "DCM", "Difference Average of GLCM") +#define CODE_DCM_DifferenceVarianceOfGLCM DSRBasicCodedEntry("128785", "DCM", "Difference Variance of GLCM") +#define CODE_DCM_DifferenceEntropyOfGLCM DSRBasicCodedEntry("128786", "DCM", "Difference Entropy of GLCM") +#define CODE_DCM_SumAverageOfGLCM DSRBasicCodedEntry("128787", "DCM", "Sum Average of GLCM") +#define CODE_DCM_SumVarianceOfGLCM DSRBasicCodedEntry("128788", "DCM", "Sum Variance of GLCM") +#define CODE_DCM_SumEntropyOfGLCM DSRBasicCodedEntry("128789", "DCM", "Sum Entropy of GLCM") +#define CODE_DCM_InverseDifferenceOfGLCM DSRBasicCodedEntry("128790", "DCM", "Inverse Difference of GLCM") +#define CODE_DCM_InverseDifferenceNormalizedOfGLCM DSRBasicCodedEntry("128791", "DCM", "Inverse Difference Normalized of GLCM") +#define CODE_DCM_InverseDifferenceMomentNormalizedOfGLCM DSRBasicCodedEntry("128792", "DCM", "Inverse Difference Moment Normalized of GLCM") +#define CODE_DCM_InverseVarianceOfGLCM DSRBasicCodedEntry("128793", "DCM", "Inverse Variance of GLCM") +#define CODE_DCM_AutocorrelationOfGLCM DSRBasicCodedEntry("128794", "DCM", "Autocorrelation of GLCM") +#define CODE_DCM_ClusterTendencyOfGLCM DSRBasicCodedEntry("128795", "DCM", "Cluster Tendency of GLCM") +#define CODE_DCM_ClusterShadeOfGLCM DSRBasicCodedEntry("128796", "DCM", "Cluster Shade of GLCM") +#define CODE_DCM_ClusterProminenceOfGLCM DSRBasicCodedEntry("128797", "DCM", "Cluster Prominence of GLCM") +#define CODE_DCM_FirstMeasureOfInformationCorrelationOfGLCM DSRBasicCodedEntry("128798", "DCM", "First Measure of Information Correlation of GLCM") +#define CODE_DCM_SecondMeasureOfInformationCorrelationOfGLCM DSRBasicCodedEntry("128799", "DCM", "Second Measure of Information Correlation of GLCM") +#define CODE_DCM_ShortRunsEmphasis DSRBasicCodedEntry("128801", "DCM", "Short Runs Emphasis") +#define CODE_DCM_LongRunsEmphasis DSRBasicCodedEntry("128802", "DCM", "Long Runs Emphasis") +#define CODE_DCM_LowGrayLevelRunEmphasis DSRBasicCodedEntry("128803", "DCM", "Low Gray Level Run Emphasis") +#define CODE_DCM_HighGrayLevelRunEmphasis DSRBasicCodedEntry("128804", "DCM", "High Gray Level Run Emphasis") +#define CODE_DCM_ShortRunLowGrayLevelEmphasis DSRBasicCodedEntry("128805", "DCM", "Short Run Low Gray Level Emphasis") +#define CODE_DCM_ShortRunHighGrayLevelEmphasis DSRBasicCodedEntry("128806", "DCM", "Short Run High Gray Level Emphasis") +#define CODE_DCM_LongRunLowGrayLevelEmphasis DSRBasicCodedEntry("128807", "DCM", "Long Run Low Gray Level Emphasis") +#define CODE_DCM_LongRunHighGrayLevelEmphasis DSRBasicCodedEntry("128808", "DCM", "Long Run High Gray Level Emphasis") +#define CODE_DCM_GrayLevelNonuniformityInRuns DSRBasicCodedEntry("128809", "DCM", "Gray Level Nonuniformity in Runs") +#define CODE_DCM_GrayLevelNonuniformityInRunsNormalized DSRBasicCodedEntry("128810", "DCM", "Gray Level Nonuniformity in Runs Normalized") +#define CODE_DCM_RunLengthNonuniformity DSRBasicCodedEntry("128811", "DCM", "Run Length Nonuniformity") +#define CODE_DCM_RunLengthNonuniformityNormalized DSRBasicCodedEntry("128812", "DCM", "Run Length Nonuniformity Normalized") +#define CODE_DCM_RunPercentage DSRBasicCodedEntry("128813", "DCM", "Run Percentage") +#define CODE_DCM_GrayLevelVarianceInRuns DSRBasicCodedEntry("128814", "DCM", "Gray Level Variance in Runs") +#define CODE_DCM_RunLengthVariance DSRBasicCodedEntry("128815", "DCM", "Run Length Variance") +#define CODE_DCM_RunEntropy DSRBasicCodedEntry("128816", "DCM", "Run Entropy") +#define CODE_DCM_SmallZoneEmphasis DSRBasicCodedEntry("128821", "DCM", "Small Zone Emphasis") +#define CODE_DCM_LargeZoneEmphasis DSRBasicCodedEntry("128822", "DCM", "Large Zone Emphasis") +#define CODE_DCM_LowGrayLevelZoneEmphasis DSRBasicCodedEntry("128823", "DCM", "Low Gray Level Zone Emphasis") +#define CODE_DCM_HighGrayLevelZoneEmphasis DSRBasicCodedEntry("128824", "DCM", "High Gray Level Zone Emphasis") +#define CODE_DCM_SmallZoneLowGrayLevelEmphasis DSRBasicCodedEntry("128825", "DCM", "Small Zone Low Gray Level Emphasis") +#define CODE_DCM_SmallZoneHighGrayLevelEmphasis DSRBasicCodedEntry("128826", "DCM", "Small Zone High Gray Level Emphasis") +#define CODE_DCM_LargeZoneLowGrayLevelEmphasis DSRBasicCodedEntry("128827", "DCM", "Large Zone Low Gray Level Emphasis") +#define CODE_DCM_LargeZoneHighGrayLevelEmphasis DSRBasicCodedEntry("128828", "DCM", "Large Zone High Gray Level Emphasis") +#define CODE_DCM_GrayLevelNonuniformityOfZoneCounts DSRBasicCodedEntry("128829", "DCM", "Gray Level Nonuniformity of Zone Counts") +#define CODE_DCM_GrayLevelNonuniformityOfZoneCountsNormalized DSRBasicCodedEntry("128830", "DCM", "Gray Level Nonuniformity of Zone Counts Normalized") +#define CODE_DCM_ZoneSizeNonuniformity DSRBasicCodedEntry("128831", "DCM", "Zone Size Nonuniformity") +#define CODE_DCM_ZoneSizeNonuniformityNormalized DSRBasicCodedEntry("128832", "DCM", "Zone Size Nonuniformity Normalized") +#define CODE_DCM_ZonePercentage DSRBasicCodedEntry("128833", "DCM", "Zone Percentage") +#define CODE_DCM_GrayLevelVarianceInZones DSRBasicCodedEntry("128834", "DCM", "Gray Level Variance in Zones") +#define CODE_DCM_ZoneSizeVariance DSRBasicCodedEntry("128835", "DCM", "Zone Size Variance") +#define CODE_DCM_ZoneSizeEntropy DSRBasicCodedEntry("128836", "DCM", "Zone Size Entropy") #endif diff --git a/dcmsr/include/dcmtk/dcmsr/codes/ncit.h b/dcmsr/include/dcmtk/dcmsr/codes/ncit.h index 8e7fa4f5..9e67e45b 100644 --- a/dcmsr/include/dcmtk/dcmsr/codes/ncit.h +++ b/dcmsr/include/dcmtk/dcmsr/codes/ncit.h @@ -3,10 +3,10 @@ * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * - * Header file with NCIt Code Definitions (Coding Scheme "NCIt") + * Header file with NCI Thesaurus Code Definitions (Coding Scheme "NCIt") * - * Generated automatically from DICOM PS 3.16-2017a - * File created on 2017-03-10 17:34:49 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017e + * File created on 2017-12-05 09:12:48 by J. Riesmeier * */ @@ -23,17 +23,18 @@ * general information * *-----------------------*/ -#define CODE_NCIt_CodingSchemeDesignator "NCIt" -#define CODE_NCIt_CodingSchemeName "NCIt" -#define CODE_NCIt_CodingSchemeDescription "NCI Thesaurus" -#define CODE_NCIt_CodingSchemeUID "2.16.840.1.113883.3.26.1.1" +#define CODE_NCIt_CodingSchemeDesignator "NCIt" +#define CODE_NCIt_CodingSchemeName "NCI Thesaurus" +#define CODE_NCIt_CodingSchemeDescription "NCI Thesaurus" +#define CODE_NCIt_CodingSchemeResponsibleOrganization "NCI" +#define CODE_NCIt_CodingSchemeUID "2.16.840.1.113883.3.26.1.1" /*--------------------* * code definitions * *--------------------*/ -// total number of codes: 17 +// total number of codes: 19 // - retired: 0 // - no name: 0 // - not unique: 0 @@ -50,12 +51,14 @@ #define CODE_NCIt_RANO DSRBasicCodedEntry("C114879", "NCIt", "RANO") #define CODE_NCIt_MouseMammaryFatPad DSRBasicCodedEntry("C22550", "NCIt", "Mouse mammary fat pad") #define CODE_NCIt_BronchioloalveolarAdenocarcinoma DSRBasicCodedEntry("C2923", "NCIt", "Bronchioloalveolar adenocarcinoma") +#define CODE_NCIt_Enrollment DSRBasicCodedEntry("C37948", "NCIt", "Enrollment") #define CODE_NCIt_ExtraluminalRoute DSRBasicCodedEntry("C38213", "NCIt", "Extraluminal route") #define CODE_NCIt_IntraepithelialRoute DSRBasicCodedEntry("C38244", "NCIt", "Intraepithelial route") #define CODE_NCIt_TransluminalRoute DSRBasicCodedEntry("C38306", "NCIt", "Transluminal route") #define CODE_NCIt_TemperatureSensorDeviceComponent DSRBasicCodedEntry("C50304", "NCIt", "Temperature sensor device component") #define CODE_NCIt_AdLibitum DSRBasicCodedEntry("C64636", "NCIt", "ad libitum") #define CODE_NCIt_ActivitySession DSRBasicCodedEntry("C67447", "NCIt", "Activity Session") +#define CODE_NCIt_UnitConversionFactor DSRBasicCodedEntry("C70774", "NCIt", "Unit Conversion Factor") #define CODE_NCIt_Erect DSRBasicCodedEntry("C86043", "NCIt", "erect") #define CODE_NCIt_BeddingChange DSRBasicCodedEntry("C90365", "NCIt", "Bedding change") #define CODE_NCIt_BeddingMaterial DSRBasicCodedEntry("C90366", "NCIt", "Bedding material") diff --git a/dcmsr/include/dcmtk/dcmsr/codes/srt.h b/dcmsr/include/dcmtk/dcmsr/codes/srt.h index 007e78f2..85b2699b 100644 --- a/dcmsr/include/dcmtk/dcmsr/codes/srt.h +++ b/dcmsr/include/dcmtk/dcmsr/codes/srt.h @@ -7,7 +7,7 @@ * * Generated semi-automatically from DICOM PS 3.16-2015c * File created on 2015-08-24 by J. Riesmeier - * Last modified on 2017-07-04 by Riesmeier + * Last modified on 2017-07-31 by Riesmeier * * NB: This file does not yet contain all codes defined in PS 3.16 since the * mapping of the code meaning to a compiler-friendly representation is @@ -51,8 +51,10 @@ #define CODE_SRT_18_Fluorine DSRBasicCodedEntry("C-111A1", "SRT", "^18^Fluorine") #define CODE_SRT_Fluorodeoxyglucose_F18 DSRBasicCodedEntry("C-B1031", "SRT", "Fluorodeoxyglucose F^18^") #define CODE_SRT_RadiopharmaceuticalAgent DSRBasicCodedEntry("F-61FDB", "SRT", "Radiopharmaceutical agent") +#define CODE_SRT_TopographicalModifier DSRBasicCodedEntry("G-A1F8", "SRT", "Topographical modifier") #define CODE_SRT_MeasurementMethod DSRBasicCodedEntry("G-C036", "SRT", "Measurement Method") #define CODE_SRT_FindingSite DSRBasicCodedEntry("G-C0E3", "SRT", "Finding Site") +#define CODE_SRT_Laterality DSRBasicCodedEntry("G-C171", "SRT", "Laterality") #define CODE_SRT_RouteOfAdministration DSRBasicCodedEntry("G-C340", "SRT", "Route of Administration") #define CODE_SRT_Neoplasm_Primary DSRBasicCodedEntry("M-80003", "SRT", "Neoplasm, Primary") #define CODE_SRT_Neoplasm_Secondary DSRBasicCodedEntry("M-80006", "SRT", "Neoplasm, Secondary") diff --git a/dcmsr/include/dcmtk/dcmsr/codes/umls.h b/dcmsr/include/dcmtk/dcmsr/codes/umls.h index f1c09646..a2e18f7a 100644 --- a/dcmsr/include/dcmtk/dcmsr/codes/umls.h +++ b/dcmsr/include/dcmtk/dcmsr/codes/umls.h @@ -5,8 +5,8 @@ * * Header file with UMLS Code Definitions (Coding Scheme "UMLS") * - * Generated automatically from DICOM PS 3.16-2017a - * File created on 2017-03-10 17:34:48 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017e + * File created on 2017-12-05 09:12:47 by J. Riesmeier * */ @@ -23,17 +23,18 @@ * general information * *-----------------------*/ -#define CODE_UMLS_CodingSchemeDesignator "UMLS" -#define CODE_UMLS_CodingSchemeName "UMLS" -#define CODE_UMLS_CodingSchemeDescription "UMLS codes as CUIs making up the values in a coding system" -#define CODE_UMLS_CodingSchemeUID "2.16.840.1.113883.6.86" +#define CODE_UMLS_CodingSchemeDesignator "UMLS" +#define CODE_UMLS_CodingSchemeName "UMLS" +#define CODE_UMLS_CodingSchemeDescription "UMLS codes as CUIs making up the values in a coding system" +#define CODE_UMLS_CodingSchemeResponsibleOrganization "NLM" +#define CODE_UMLS_CodingSchemeUID "2.16.840.1.113883.6.86" /*--------------------* * code definitions * *--------------------*/ -// total number of codes: 40 +// total number of codes: 43 // - retired: 0 // - no name: 0 // - not unique: 0 @@ -62,6 +63,8 @@ #define CODE_UMLS_Fluanisone DSRBasicCodedEntry("C0060473", "UMLS", "Fluanisone") #define CODE_UMLS_HeatLamp DSRBasicCodedEntry("C0181514", "UMLS", "Heat lamp") #define CODE_UMLS_UnknownPrimaryNeoplasiaSite DSRBasicCodedEntry("C0221297", "UMLS", "unknown primary neoplasia site") +#define CODE_UMLS_RestrictedDiet DSRBasicCodedEntry("C0425422", "UMLS", "Restricted diet") +#define CODE_UMLS_InfantOfMotherWithGestationalDiabetes DSRBasicCodedEntry("C0456029", "UMLS", "Infant of mother with gestational diabetes") #define CODE_UMLS_CoefficientOfVariance DSRBasicCodedEntry("C0681921", "UMLS", "Coefficient of Variance") #define CODE_UMLS_Intern DSRBasicCodedEntry("C1144859", "UMLS", "Intern") #define CODE_UMLS_ConsultingPhysician DSRBasicCodedEntry("C1441532", "UMLS", "Consulting Physician") @@ -86,6 +89,7 @@ #define CODE_UMLS_ISO1_F18 DSRBasicCodedEntry("C2981788", "UMLS", "ISO-1 F^18^") #define CODE_UMLS_RadiationPhysicist DSRBasicCodedEntry("C2985483", "UMLS", "Radiation Physicist") #define CODE_UMLS_Pretreatment DSRBasicCodedEntry("C3539075", "UMLS", "Pretreatment") +#define CODE_UMLS_DistalPhalanx DSRBasicCodedEntry("C3669027", "UMLS", "Distal phalanx") #define CODE_UMLS_RoomAir DSRBasicCodedEntry("C3846005", "UMLS", "Room air") #endif diff --git a/dcmsr/include/dcmtk/dcmsr/dsrcitem.h b/dcmsr/include/dcmtk/dcmsr/dsrcitem.h index 1fa6dad3..0f42da18 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrcitem.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrcitem.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -65,6 +65,22 @@ class DCMTK_DCMSR_EXPORT DSRContentItem */ virtual ~DSRContentItem(); + /** comparison operator "equal". + * Two content items are regarded as equal if the comparison operator of the referenced + * document tree nodes says so. + ** @param item content item that should be compared to the current one + ** @return OFTrue if both content items are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRContentItem &item) const; + + /** comparison operator "not equal". + * Two content items are regarded as not equal if the comparison operator of the + * referenced document tree nodes says so. + ** @param item content item that should be compared to the current one + ** @return OFTrue if both content items are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRContentItem &item) const; + /** check for validity/completeness. * Applicable to all content items. ** @return OFTrue if current content item is valid, OFFalse otherwise diff --git a/dcmsr/include/dcmtk/dcmsr/dsrcodtn.h b/dcmsr/include/dcmtk/dcmsr/dsrcodtn.h index cd01162c..a7f8cadb 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrcodtn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrcodtn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,23 @@ class DCMTK_DCMSR_EXPORT DSRCodeTreeNode */ virtual ~DSRCodeTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrcodvl.h b/dcmsr/include/dcmtk/dcmsr/dsrcodvl.h index a5a8f0aa..03a0bf9b 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrcodvl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrcodvl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -198,9 +198,10 @@ class DCMTK_DCMSR_EXPORT DSRCodedEntryValue DSRCodedEntryValue &operator=(const DSRCodedEntryValue &codedEntryValue); /** comparison operator "equal". - * Two codes are equal if the code value, coding scheme designator and the (optional) - * coding scheme version are equal. The code meaning is not relevant for this check. - ** @param codedEntryValue code which should be compared to the current one + * Two codes are equal if the code value, the coding scheme designator and the (optional) + * coding scheme version are equal. The code meaning or attributes from the "Enhanced + * Encoding Mode" are not used for this check. + ** @param codedEntryValue code that should be compared to the current one ** @return OFTrue if both codes are equal, OFFalse otherwise */ OFBool operator==(const DSRCodedEntryValue &codedEntryValue) const; @@ -208,16 +209,16 @@ class DCMTK_DCMSR_EXPORT DSRCodedEntryValue /** comparison operator "not equal". * Two codes are not equal if either the code value or the coding scheme designator * or the (optional) coding scheme version are not equal. The code meaning is not - * relevant for this check. - ** @param codedEntryValue code which should be compared to the current one + * used for this check. + ** @param codedEntryValue code that should be compared to the current one ** @return OFTrue if both codes are not equal, OFFalse otherwise */ OFBool operator!=(const DSRCodedEntryValue &codedEntryValue) const; /** comparison operator "equal". - * Two codes are equal if the code value, coding scheme designator and the (optional) - * coding scheme version are equal. The code meaning is not relevant for this check. - ** @param basicCodedEntry code which should be compared to the current one + * Two codes are equal if the code value, the coding scheme designator and the (optional) + * coding scheme version are equal. The code meaning is not used for this check. + ** @param basicCodedEntry code that should be compared to the current one ** @return OFTrue if both codes are equal, OFFalse otherwise */ OFBool operator==(const DSRBasicCodedEntry &basicCodedEntry) const; @@ -225,8 +226,8 @@ class DCMTK_DCMSR_EXPORT DSRCodedEntryValue /** comparison operator "not equal". * Two codes are not equal if either the code value or the coding scheme designator * or the (optional) coding scheme version are not equal. The code meaning is not - * relevant for this check. - ** @param basicCodedEntry code which should be compared to the current one + * used for this check. + ** @param basicCodedEntry code that should be compared to the current one ** @return OFTrue if both codes are not equal, OFFalse otherwise */ OFBool operator!=(const DSRBasicCodedEntry &basicCodedEntry) const; @@ -278,7 +279,7 @@ class DCMTK_DCMSR_EXPORT DSRCodedEntryValue * However, this method always reads the first item from the given sequence. If another * item should be read (e.g. a modifier), the method readSequenceItem() should be used. ** @param dataset DICOM dataset from which the code sequence should be read - * @param tagKey DICOM tag specifying the attribute (= sequence) which should be read + * @param tagKey DICOM tag specifying the attribute (= sequence) that should be read * @param type value type of the sequence (valid value: "1", "2", something else). * This parameter is used for checking purpose, any difference is * reported. @@ -306,7 +307,7 @@ class DCMTK_DCMSR_EXPORT DSRCodedEntryValue /** write code sequence to dataset ** @param dataset DICOM dataset to which the code sequence should be written - * @param tagKey DICOM tag specifying the attribute (= sequence) which should be + * @param tagKey DICOM tag specifying the attribute (= sequence) that should be * written ** @return status, EC_Normal if successful, an error code otherwise */ diff --git a/dcmsr/include/dcmtk/dcmsr/dsrcomtn.h b/dcmsr/include/dcmtk/dcmsr/dsrcomtn.h index f7842ddf..8a354172 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrcomtn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrcomtn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,23 @@ class DCMTK_DCMSR_EXPORT DSRCompositeTreeNode */ virtual ~DSRCompositeTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrcomvl.h b/dcmsr/include/dcmtk/dcmsr/dsrcomvl.h index e1d94837..59d1de5a 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrcomvl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrcomvl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -74,6 +74,18 @@ class DCMTK_DCMSR_EXPORT DSRCompositeReferenceValue */ DSRCompositeReferenceValue &operator=(const DSRCompositeReferenceValue &referenceValue); + /** comparison operator "equal" + ** @param referenceValue reference value that should be compared to the current one + ** @return OFTrue if both composite reference values are equal, OFFalse otherwise + */ + OFBool operator==(const DSRCompositeReferenceValue &referenceValue) const; + + /** comparison operator "not equal" + ** @param referenceValue reference value that should be compared to the current one + ** @return OFTrue if both composite reference values are not equal, OFFalse otherwise + */ + OFBool operator!=(const DSRCompositeReferenceValue &referenceValue) const; + /** clear all internal variables. * Since an empty reference value is invalid the reference becomes invalid afterwards. */ @@ -133,7 +145,7 @@ class DCMTK_DCMSR_EXPORT DSRCompositeReferenceValue * enabled, a warning message is printed if the sequence is absent or contains more than * one item. ** @param dataset DICOM dataset from which the sequence should be read - * @param tagKey DICOM tag specifying the attribute (= sequence) which should be read + * @param tagKey DICOM tag specifying the attribute (= sequence) that should be read * @param type value type of the sequence (valid value: "1", "2", something else) * This parameter is used for checking purpose, any difference is reported. * @param flags flag used to customize the reading process (see DSRTypes::RF_xxx) @@ -147,7 +159,7 @@ class DCMTK_DCMSR_EXPORT DSRCompositeReferenceValue /** write referenced SOP sequence to dataset. * If the value is empty an empty sequence (without any items) is written. ** @param dataset DICOM dataset to which the sequence should be written - * @param tagKey DICOM tag specifying the attribute (= sequence) which should be written + * @param tagKey DICOM tag specifying the attribute (= sequence) that should be written ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition writeSequence(DcmItem &dataset, diff --git a/dcmsr/include/dcmtk/dcmsr/dsrcontn.h b/dcmsr/include/dcmtk/dcmsr/dsrcontn.h index 1ff94716..8314c376 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrcontn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrcontn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -61,6 +61,23 @@ class DCMTK_DCMSR_EXPORT DSRContainerTreeNode */ virtual ~DSRContainerTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrcsidl.h b/dcmsr/include/dcmtk/dcmsr/dsrcsidl.h index f497ff1d..116fb728 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrcsidl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrcsidl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2016, OFFIS e.V. + * Copyright (C) 2003-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -329,6 +329,8 @@ class DCMTK_DCMSR_EXPORT DSRCodingSchemeIdentificationList OFString CodingSchemeVersion; /// Coding Scheme Responsible Organization (VR=ST, type 3) OFString CodingSchemeResponsibleOrganization; + /// Coding Scheme Resources Sequence (VR=SQ, type 3) + // - tbd: optional attribute not yet supported }; /** add the specified coding scheme to the list (if not existent) diff --git a/dcmsr/include/dcmtk/dcmsr/dsrctpl.h b/dcmsr/include/dcmtk/dcmsr/dsrctpl.h index 9b45311f..be7a741a 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrctpl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrctpl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -74,6 +74,14 @@ class DCMTK_DCMSR_EXPORT DSRTemplateCommon return ExtensibleMode; } + /** check whether the order of content items in this template is significant + ** @return OFTrue if order is significant, OFFalse otherwise + */ + virtual OFBool isOrderSignificant() const + { + return OrderSignificantMode; + } + /** compare template identification with given values ** @param templateIdentifier template identifier to compare with * @param mappingResource mapping resource that defines the template @@ -117,6 +125,15 @@ class DCMTK_DCMSR_EXPORT DSRTemplateCommon ExtensibleMode = mode; } + /** change mode specifying whether the order of content items in this template is + * significant or non-significant + ** @param mode set order of content items to significant if OFTrue (default) + */ + virtual void setOrderSignificant(const OFBool mode = OFTrue) + { + OrderSignificantMode = mode; + } + protected: @@ -203,6 +220,9 @@ class DCMTK_DCMSR_EXPORT DSRTemplateCommon const OFString MappingResourceUID; /// mode indicating whether template is extensible (default: false) OFBool ExtensibleMode; + /// mode indicating whether the order of content items in this template is + /// significant (default: false) + OFBool OrderSignificantMode; /// list of node IDs used to remember certain positions in the template OFVector NodeList; diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdattn.h b/dcmsr/include/dcmtk/dcmsr/dsrdattn.h index 3f07caed..5fa0206d 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrdattn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrdattn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -72,6 +72,23 @@ class DCMTK_DCMSR_EXPORT DSRDateTreeNode */ virtual ~DSRDateTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdncsr.h b/dcmsr/include/dcmtk/dcmsr/dsrdncsr.h index e32c4e8f..dac6f5a8 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrdncsr.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrdncsr.h @@ -16,18 +16,19 @@ * Author: Joerg Riesmeier * * Purpose: - * classes: DSRDocumentTreeNodeCursor, DSRIncludedTemplateNodeCursor + * classes: DSRDocumentTreeNodeCursor * */ -#ifndef DSRDOCSR_H -#define DSRDOCSR_H +#ifndef DSRDNCSR_H +#define DSRDNCSR_H #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmsr/dsdefine.h" #include "dcmtk/dcmsr/dsrtncsr.h" +#include "dcmtk/dcmsr/dsrdnflt.h" /*-----------------------* @@ -37,29 +38,82 @@ class DSRDocumentTreeNode; -/*--------------------* - * type definitions * - *--------------------*/ +/*---------------------* + * class declaration * + *---------------------*/ -typedef DSRTreeNodeCursor DSRDocumentTreeNodeCursor; -typedef DSRTreeNodeCursor DSRIncludedTemplateNodeCursor; - - -/*-------------------------------------------* - * declaration of template specializations * - *-------------------------------------------*/ - -DCMTK_EXPLICIT_SPECIALIZATION DCMTK_DCMSR_EXPORT -const DSRDocumentTreeNode *DSRTreeNodeCursor::getChildNode() const; - -DCMTK_EXPLICIT_SPECIALIZATION DCMTK_DCMSR_EXPORT -size_t DSRTreeNodeCursor::countChildNodes(const OFBool searchIntoSub) const; - -DCMTK_EXPLICIT_SPECIALIZATION DCMTK_DCMSR_EXPORT -size_t DSRTreeNodeCursor::goDown(); - -DCMTK_EXPLICIT_SPECIALIZATION DCMTK_DCMSR_EXPORT -size_t DSRTreeNodeCursor::iterate(const OFBool searchIntoSub); +/** Class implementing a document tree node cursor. + * Included sub-templates are not supported by this type of cursor, i.e. the subtree + * that is managed by an instance of DSRIncludedTemplateTreeNode is not iterated. + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeCursor + : public DSRTreeNodeCursor +{ + + public: + + /** default constructor + */ + DSRDocumentTreeNodeCursor(); + + /** copy constructor + ** @param cursor object to be copied + */ + DSRDocumentTreeNodeCursor(const DSRDocumentTreeNodeCursor &cursor); + + /** copy constructor (for base class) + ** @param cursor object to be copied + */ + DSRDocumentTreeNodeCursor(const DSRTreeNodeCursor &cursor); + + /** constructor. + * See comments on DSRTreeNodeCursor<>::setCursor() method. + ** @param node pointer to tree node used to initialize the cursor + * @param position optional pointer to position counter that should be used to + * initialize the internal counter + */ + DSRDocumentTreeNodeCursor(DSRDocumentTreeNode *node, + const DSRPositionCounter *position = NULL); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeCursor(); + + /** assignment operator + ** @param cursor object to be copied + ** @return reference to modified cursor (this object) + */ + DSRDocumentTreeNodeCursor &operator=(const DSRDocumentTreeNodeCursor &cursor); + + /** assignment operator. + * See comments on DSRTreeNodeCursor<>::setCursor() method. + ** @param node node to which the cursor should be set + ** @return reference to modified cursor (this object) + */ + DSRDocumentTreeNodeCursor &operator=(DSRDocumentTreeNode *node); + + /** set internal cursor to a matching node (starting from current position). + * If more than one node exists matching the given filter, the first one will be + * selected. Use gotoNextMatchingNode() in order to go to the next matching node. + ** @param filter matching criterion based on a single or multiple filters + * @param searchIntoSub flag indicating whether to search into sub-trees + * ("deep search") or on the current level only + ** @return ID of the new current node if successful, 0 otherwise + */ + virtual size_t gotoMatchingNode(const DSRDocumentTreeNodeFilter &filter, + const OFBool searchIntoSub = OFTrue); + + /** set internal cursor to the next matching node. + * Starts from "next" node, i.e. either the first child of the current node or the + * first sibling following the current node. + ** @param filter matching criterion based on a single or multiple filters + * @param searchIntoSub flag indicating whether to search into sub-trees + * ("deep search") or on the current level only + ** @return ID of the new current node if successful, 0 otherwise + */ + virtual size_t gotoNextMatchingNode(const DSRDocumentTreeNodeFilter &filter, + const OFBool searchIntoSub = OFTrue); +}; #endif diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdnflt.h b/dcmsr/include/dcmtk/dcmsr/dsrdnflt.h new file mode 100644 index 00000000..f3422841 --- /dev/null +++ b/dcmsr/include/dcmtk/dcmsr/dsrdnflt.h @@ -0,0 +1,456 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmsr + * + * Author: Joerg Riesmeier + * + * Purpose: + * classes: DSRDocumentTreeNodeFilter and derived implementations + * + */ + + +#ifndef DSRDNFLT_H +#define DSRDNFLT_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsdefine.h" +#include "dcmtk/dcmsr/dsrcodvl.h" +#include "dcmtk/dcmsr/dsrtnant.h" +#include "dcmtk/dcmsr/dsrtypes.h" + +#include "dcmtk/ofstd/oflist.h" +#include "dcmtk/ofstd/ofdatime.h" + + +/*-----------------------* + * forward declaration * + *-----------------------*/ + +class DSRDocumentTreeNode; + + + +/*----------------------* + * class declarations * + *----------------------*/ + +/** Base class for a single document tree node filter + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeFilter +{ + + public: + + /** destructor + */ + virtual ~DSRDocumentTreeNodeFilter(); + + /** check whether given node matches the filter criterion (abstract) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const = 0; +}; + + +/** Base class for a list of document tree node filters + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeFilterList + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** destructor + */ + virtual ~DSRDocumentTreeNodeFilterList(); + + /** add a document tree node filter to the list + ** @param filter pointer to a single filter or to a list of filters to be added. + * Ownership is passed to this list, i.e. memory is deleted by the + * destructor. Therefore, the instance has to be created with new(). + ** @return status, EC_Normal if successful, an error code otherwise + */ + OFCondition addFilter(DSRDocumentTreeNodeFilter *filter); + + /** check whether given node matches the filter criteria in the list (abstract) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criteria, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const = 0; + + + protected: + + /// list of pointers to filter criteria + OFList FilterList; +}; + + +/** Class implementing a list of document tree node filters that are combined with AND + * (conjunction) + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeAndFilter + : public DSRDocumentTreeNodeFilterList +{ + + public: + + /** destructor + */ + virtual ~DSRDocumentTreeNodeAndFilter(); + + /** check whether given node matches all filter criteria in the list + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criteria, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; +}; + + +/** Class implementing a list of document tree node filters that are combined with OR + * (disjunction) + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeOrFilter + : public DSRDocumentTreeNodeFilterList +{ + + public: + + /** destructor + */ + virtual ~DSRDocumentTreeNodeOrFilter(); + + /** check whether given node matches at least a single filter criterion in the list + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criteria, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; +}; + + +/** Class implementing a document tree node filter that checks for the presence (or + * absence) of child nodes + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeHasChildrenFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor + ** @param hasChildren mode specifying whether the filter matches on the presence + * (default) or absence of child nodes + */ + DSRDocumentTreeNodeHasChildrenFilter(const OFBool hasChildren = OFTrue); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeHasChildrenFilter(); + + /** check whether given node matches the filter criterion + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// mode specifying whether the filter matches on the presence or absence of child + /// nodes + const OFBool HasChildren; +}; + + +/** Class implementing a document tree node filter that checks for the presence (or + * absence) of sibling nodes + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeHasSiblingsFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor + ** @param hasSiblings mode specifying whether the filter matches on the presence + * (default) or absence of sibling nodes + */ + DSRDocumentTreeNodeHasSiblingsFilter(const OFBool hasSiblings = OFTrue); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeHasSiblingsFilter(); + + /** check whether given node matches the filter criterion + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// mode specifying whether the filter matches on the presence or absence of sibling + /// nodes + const OFBool HasSiblings; +}; + + +/** Class implementing a document tree node filter that checks for a given concept name + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeConceptNameFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor + ** @param conceptName concept name to check for + */ + DSRDocumentTreeNodeConceptNameFilter(const DSRCodedEntryValue &conceptName); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeConceptNameFilter(); + + /** check whether given node matches the filter criterion (concept name) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// concept name to check for + const DSRCodedEntryValue ConceptName; +}; + + +/** Class implementing a document tree node filter that checks for a given value type + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeValueTypeFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor + ** @param valueType value type to check for + */ + DSRDocumentTreeNodeValueTypeFilter(const DSRTypes::E_ValueType &valueType); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeValueTypeFilter(); + + /** check whether given node matches the filter criterion (value type) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// value type to check for + const DSRTypes::E_ValueType ValueType; +}; + + +/** Class implementing a document tree node filter that checks for a given relationship + * type + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeRelationshipTypeFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor + ** @param relationshipType relationship type to check for + */ + DSRDocumentTreeNodeRelationshipTypeFilter(const DSRTypes::E_RelationshipType &relationshipType); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeRelationshipTypeFilter(); + + /** check whether given node matches the filter criterion (relationship type) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// relationship type to check for + const DSRTypes::E_RelationshipType RelationshipType; +}; + + +/** Class implementing a document tree node filter that checks for a given annotation + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeAnnotationFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor + ** @param annotation annotation to check for + */ + DSRDocumentTreeNodeAnnotationFilter(const DSRTreeNodeAnnotation &annotation); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeAnnotationFilter(); + + /** check whether given node matches the filter criterion (annotation) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// annotation to check for + const DSRTreeNodeAnnotation Annotation; +}; + + +/** Class implementing a document tree node filter that checks for a given range of + * observation date/time values + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeObservationDateTimeFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor. + * Empty date/time values are not used for checking. E.g. if only 'fromDateTime' is + * specified (non-empty) all moments in time subsequent to and including it match. + * If both date/time values are empty, only an empty observation date/time of the + * document tree node matches. + ** @param fromDateTime start observation date/time to check for (might be empty) + * @param toDateTime end observation date/time to check for (might be empty) + */ + DSRDocumentTreeNodeObservationDateTimeFilter(const OFString &fromDateTime, + const OFString &toDateTime); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeObservationDateTimeFilter(); + + /** check whether given node matches the filter criterion (observation date/time) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// start observation date/time to check for (as a string, might be empty) + const OFString FromDateTime; + /// end observation date/time to check for (as a string, might be empty) + const OFString ToDateTime; + /// start observation date/time to check for (as a converted OFDateTime instance) + OFDateTime FromDateTimeValue; + /// end observation date/time to check for (as a converted OFDateTime instance) + OFDateTime ToDateTimeValue; +}; + + +/** Class implementing a document tree node filter that checks for a given observation + * unique identifier + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeObservationUIDFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor + ** @param observationUID observation unique identifier to check for + */ + DSRDocumentTreeNodeObservationUIDFilter(const OFString &observationUID); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeObservationUIDFilter(); + + /** check whether given node matches the filter criterion (observation unique + * identifier) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// observation unique identifier to check for + const OFString ObservationUID; +}; + + +/** Class implementing a document tree node filter that checks for a given template + * identification + */ +class DCMTK_DCMSR_EXPORT DSRDocumentTreeNodeTemplateIdentificationFilter + : public DSRDocumentTreeNodeFilter +{ + + public: + + /** constructor + ** @param templateIdentifier template identifier to check for + * @param mappingResource mapping resource that defines the template + * @param mappingResourceUID uniquely identifies the mapping resource (optional). + * Not used for comparison if the value is empty. + */ + DSRDocumentTreeNodeTemplateIdentificationFilter(const OFString &templateIdentifier, + const OFString &mappingResource, + const OFString &mappingResourceUID = ""); + + /** destructor + */ + virtual ~DSRDocumentTreeNodeTemplateIdentificationFilter(); + + /** check whether given node matches the filter criterion (template identification) + ** @param node pointer to the node to be checked + ** @return OFTrue if 'node' matches the filter criterion, OFFalse otherwise + */ + virtual OFBool matches(const DSRDocumentTreeNode *node) const; + + + private: + + /// template identifier to check for + const OFString TemplateIdentifier; + /// mapping resource to check for + const OFString MappingResource; + /// mapping resource unique identifier to check for (if not empty) + const OFString MappingResourceUID; +}; + + +#endif diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdoc.h b/dcmsr/include/dcmtk/dcmsr/dsrdoc.h index 614c3454..63542778 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrdoc.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrdoc.h @@ -407,8 +407,10 @@ class DCMTK_DCMSR_EXPORT DSRDocument * The DICOM standard states: "Such referenced Instances may include equivalent documents or * renderings of this document. [...] Required if the identity of a CDA Document equivalent * to the current SOP Instance is known at the time of creation of this SOP instance. May be - * present otherwise." Note: An equivalent rendering of the document might be provided as an - * "Encapsulated PDF" DICOM object. + * present otherwise." The Purpose of Reference Code should be taken from Defined Context + * Group 7006 (SR Document Purposes of Reference). + * Note: An equivalent rendering of the document might be provided as an "Encapsulated PDF" + * DICOM object. * @note Not applicable to Key Object Selection Documents. ** @return reference to list object */ diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdocst.h b/dcmsr/include/dcmtk/dcmsr/dsrdocst.h index 5b9508b3..e1cde3ca 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrdocst.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrdocst.h @@ -29,6 +29,7 @@ #include "dcmtk/dcmsr/dsrtree.h" #include "dcmtk/dcmsr/dsrdoctn.h" #include "dcmtk/dcmsr/dsrdncsr.h" +#include "dcmtk/dcmsr/dsritcsr.h" #include "dcmtk/dcmsr/dsrcitem.h" #include "dcmtk/ofstd/ofmem.h" @@ -210,6 +211,30 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree */ virtual OFBool getCursorToRootNode(DSRIncludedTemplateNodeCursor &cursor) const; + /** get a cursor to the current node of this document tree. + * This cursor can be used to iterate over the nodes of the document subtree that + * starts at the current node without changing the internal cursor. Please note + * that the cursor might become invalid, e.g. by pointing to a non-existing node if + * the content of the document tree is modified after the cursor has been retrieved. + * Included sub-templates are not supported by this type of cursor, i.e. the subtree + * that is managed by an instance of DSRIncludedTemplateTreeNode is not iterated. + ** @param cursor reference to variable where the cursor is stored + ** @return OFTrue is the returned 'cursor' is valid, OFFalse otherwise + */ + virtual OFBool getCursorToCurrentNode(DSRDocumentTreeNodeCursor &cursor) const; + + /** get a cursor to the subtree below the current node. + * This cursor can be used to iterate over the nodes of the selected subtree without + * changing the internal cursor. Please note that the cursor might become invalid, + * e.g. by pointing to a non-existing node if the content of the document tree is + * modified after the cursor has been retrieved. + * Included sub-templates are not supported by this type of cursor, i.e. the subtree + * that is managed by an instance of DSRIncludedTemplateTreeNode is not iterated. + ** @param cursor reference to variable where the cursor is stored + ** @return OFTrue is the returned 'cursor' is valid, OFFalse otherwise + */ + virtual OFBool getCursorToSubTree(DSRDocumentTreeNodeCursor &cursor) const; + /** count number of content items (nodes) in the document tree. * This method iterates over all nodes that are stored in the document tree. * By default, included sub-templates are counted as a single node (see options). @@ -224,12 +249,37 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree size_t countNodes(const OFBool searchIntoSubTemplates = OFFalse, const OFBool countIncludedTemplateNodes = OFTrue) const; + /** set internal cursor to a matching node. + * If more than one node exists matching the given filter, the first one will be + * selected. Use gotoNextMatchingNode() in order to go to the next matching node. + ** @param filter matching criterion based on a single or multiple filters + * @param startFromRoot flag indicating whether to start from the root node or + * the current one + * @param searchIntoSub flag indicating whether to search into sub-trees + * ("deep search") or on the current level only + ** @return ID of the new current node if successful, 0 otherwise + */ + virtual size_t gotoMatchingNode(const DSRDocumentTreeNodeFilter &filter, + const OFBool startFromRoot = OFTrue, + const OFBool searchIntoSub = OFTrue); + + /** set internal cursor to the next matching node. + * Starts from "next" node, i.e. either the first child of the current node or the + * first sibling following the current node. + ** @param filter matching criterion based on a single or multiple filters + * @param searchIntoSub flag indicating whether to search into sub-trees + * ("deep search") or on the current level only + ** @return ID of the new current node if successful, 0 otherwise + */ + virtual size_t gotoNextMatchingNode(const DSRDocumentTreeNodeFilter &filter, + const OFBool searchIntoSub = OFTrue); + /** set internal cursor to a named node. * If more than one node exists with the given concept name, the first one will * be selected. Use gotoNextNamedNode() in order to go to the next matching node. ** @param conceptName concept name of the node to be searched for - * @param startFromRoot flag indicating whether to start from the root node - * or the current one + * @param startFromRoot flag indicating whether to start from the root node or + * the current one * @param searchIntoSub flag indicating whether to search into sub-trees * ("deep search") or on the current level only ** @return ID of the new current node if successful, 0 otherwise @@ -244,7 +294,7 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree * with 'searchIntoSub' being OFFalse, i.e. only the first sub-level is checked. * If more than one node exists with the given concept name, the first one will * be selected. - ** @param conceptName concept name of the node to be searched for + ** @param conceptName concept name of the node to be searched for ** @return ID of the new current node if successful, 0 otherwise */ virtual size_t gotoNamedChildNode(const DSRCodedEntryValue &conceptName); @@ -276,8 +326,8 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree * be selected. Use gotoNextAnnotatedNode() in order to go to the next matching * node. In contrast to gotoNamedNode(), a "deep search" is always performed. ** @param annotationText annotation text of the node to be searched for - * @param startFromRoot flag indicating whether to start from the root node - * or the current one + * @param startFromRoot flag indicating whether to start from the root node or + * the current one ** @return ID of the new current node if successful, 0 otherwise */ virtual size_t gotoAnnotatedNode(const OFString &annotationText, @@ -360,11 +410,12 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree * method is called with the third parameter being DSRTypes::AM_afterCurrent. If * successful, the given concept name is set for the new node, and the cursor is updated. * @note This is a convenience function that avoids calling several other functions. - ** @param relationshipType relationship type of node to be added with regard - * to the current one + ** @param relationshipType relationship type of node to be added with regard to + * the current one * @param valueType value type of node to be added * @param conceptName concept name of the node to be added - * @param check if enabled, check 'conceptName for validity before setting it + * @param check if enabled, check 'conceptName for validity before + * setting it ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition addContentItem(const E_RelationshipType relationshipType, @@ -378,11 +429,12 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree * is called with the third parameter being DSRTypes::AM_belowCurrent. If successful, * the given concept name is set for the new node, and the cursor is updated. * @note This is a convenience function that avoids calling several other functions. - ** @param relationshipType relationship type of node to be added with regard - * to the current one + ** @param relationshipType relationship type of node to be added with regard to + * the current one * @param valueType value type of node to be added * @param conceptName concept name of the node to be added - * @param check if enabled, check 'conceptName for validity before setting it + * @param check if enabled, check 'conceptName for validity before + * setting it ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition addChildContentItem(const E_RelationshipType relationshipType, @@ -454,7 +506,7 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree const E_RelationshipType defaultRelType = RT_unknown, const OFBool deleteIfFail = OFFalse); - /** extract a subtree i.e.\ a fragment from this tree. + /** extract a subtree, i.e.\ a fragment from this tree. * The subtree is specified by the current node, which becomes the root of the subtree. * In contrast to cloneSubTree(), this method also makes sure that the by-reference * relationships are preserved (as long as both source and target node are contained @@ -491,7 +543,7 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree */ virtual DSRDocumentTreeNode *cloneCurrentTreeNode() const; - /** clone a subtree i.e.\ a fragment of this tree. + /** clone a subtree, i.e.\ a fragment of this tree. * The cloning starts with the current node and ends with the given node. * Please note that the returned subtree has to be deleted by the caller if it is not * inserted into the document tree using insertSubTree(). @@ -580,7 +632,7 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree DSRDocumentSubTree(DSRDocumentTreeNode *rootNode); /** special copy constructor that clones a particular subtree only - ** @param startCursor first node of the subtree to be copied + ** @param startCursor cursor pointing to first node of the subtree to be copied * @param stopAfterNodeID ID of the node after which the cloning should stop */ DSRDocumentSubTree(const DSRDocumentTreeNodeCursor &startCursor, @@ -717,6 +769,16 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree virtual OFCondition checkSubTreeConstraints(const DSRDocumentSubTree *tree, const DSRIODConstraintChecker *checker) const; + // --- static helper function --- + + /** clone a particular subtree, i.e.\ a fragment of a tree + ** @param startCursor cursor pointing to first node of the subtree to be copied + * @param stopAfterNodeID ID of the node after which the cloning should stop + ** @return pointer to a copy of the specified subtree, NULL in case of error + */ + static DSRDocumentSubTree *cloneSubTree(const DSRDocumentTreeNodeCursor &startCursor, + const size_t stopAfterNodeID = 0); + /// check relationship content constraints of the associated IOD DSRIODConstraintChecker *ConstraintChecker; diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdoctn.h b/dcmsr/include/dcmtk/dcmsr/dsrdoctn.h index 86ee8cf9..14e95d49 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrdoctn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrdoctn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -48,8 +48,10 @@ class DCMTK_DCMSR_EXPORT DSRDocumentTreeNode { // allow direct access to protected methods friend class DSRTree; - friend class DSRTreeNodeCursor; - friend class DSRTreeNodeCursor; + friend class DSRTreeNodeCursor; + // also for the derived cursor classes + friend class DSRDocumentTreeNodeCursor; + friend class DSRIncludedTemplateNodeCursor; // allow access to getConceptNamePtr() friend class DSRContentItem; @@ -85,6 +87,24 @@ class DCMTK_DCMSR_EXPORT DSRDocumentTreeNode */ virtual ~DSRDocumentTreeNode(); + /** comparison operator "equal". + * Two tree nodes are regarded as equal if the relationship type, the value type and the + * concept name are equal. Other information is not used unless implemented in a derived + * class. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are regarded as not equal if either the relationship type or the value + * type or the concept name are not equal. Other information is not used unless implemented + * in a derived class. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node (abstract). * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdtitn.h b/dcmsr/include/dcmtk/dcmsr/dsrdtitn.h index 62e9c19e..631b353b 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrdtitn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrdtitn.h @@ -72,6 +72,23 @@ class DCMTK_DCMSR_EXPORT DSRDateTimeTreeNode */ virtual ~DSRDateTimeTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrimgtn.h b/dcmsr/include/dcmtk/dcmsr/dsrimgtn.h index 9ae1c34e..98573b34 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrimgtn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrimgtn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,23 @@ class DCMTK_DCMSR_EXPORT DSRImageTreeNode */ virtual ~DSRImageTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrimgvl.h b/dcmsr/include/dcmtk/dcmsr/dsrimgvl.h index 01f622c6..20e7a3c1 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrimgvl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrimgvl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -112,6 +112,20 @@ class DCMTK_DCMSR_EXPORT DSRImageReferenceValue */ DSRImageReferenceValue &operator=(const DSRImageReferenceValue &referenceValue); + /** comparison operator "equal". + * Please note that the optional icon image is not used for comparing the two values. + ** @param referenceValue image reference value that should be compared to the current one + ** @return OFTrue if both image reference values are equal, OFFalse otherwise + */ + OFBool operator==(const DSRImageReferenceValue &referenceValue) const; + + /** comparison operator "not equal". + * Please note that the optional icon image is not used for comparing the two values. + ** @param referenceValue image reference value that should be compared to the current one + ** @return OFTrue if both image reference values are not equal, OFFalse otherwise + */ + OFBool operator!=(const DSRImageReferenceValue &referenceValue) const; + /** clear all internal variables. * Since an empty image reference is invalid the reference becomes invalid afterwards. */ @@ -427,7 +441,7 @@ class DCMTK_DCMSR_EXPORT DSRImageReferenceValue /** check the specified SOP class UID for validity. * This method further specializes the checks performed in the base class * DSRCompositeReferenceValue. All image and segmentation SOP classes that - * are defined in DICOM PS 3.6-2015c are allowed. + * are defined in DICOM PS 3.6-2017e are allowed. ** @param sopClassUID SOP class UID to be checked ** @return status, EC_Normal if value is valid, an error code otherwise */ diff --git a/dcmsr/include/dcmtk/dcmsr/dsritcsr.h b/dcmsr/include/dcmtk/dcmsr/dsritcsr.h new file mode 100644 index 00000000..a8e64a88 --- /dev/null +++ b/dcmsr/include/dcmtk/dcmsr/dsritcsr.h @@ -0,0 +1,111 @@ +/* + * + * Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmsr + * + * Author: Joerg Riesmeier + * + * Purpose: + * classes: DSRIncludedTemplateNodeCursor + * + */ + + +#ifndef DSRITCSR_H +#define DSRITCSR_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsdefine.h" +#include "dcmtk/dcmsr/dsrtncsr.h" + + +/*---------------------* + * class declaration * + *---------------------*/ + +/** Class implementing a document tree node cursor. + * This type of cursor also supports included sub-templates, i.e. the subtree that is + * managed by an instance of DSRIncludedTemplateTreeNode is also iterated. + */ +class DCMTK_DCMSR_EXPORT DSRIncludedTemplateNodeCursor + : public DSRTreeNodeCursor +{ + + public: + + /** default constructor + */ + DSRIncludedTemplateNodeCursor(); + + /** copy constructor + ** @param cursor object to be copied + */ + DSRIncludedTemplateNodeCursor(const DSRIncludedTemplateNodeCursor &cursor); + + /** constructor. + * See comments on DSRTreeNodeCursor<>::setCursor() method. + ** @param node pointer to tree node used to initialize the cursor + * @param position optional pointer to position counter that should be used to + * initialize the internal counter + */ + DSRIncludedTemplateNodeCursor(DSRDocumentTreeNode *node, + const DSRPositionCounter *position = NULL); + + /** destructor + */ + virtual ~DSRIncludedTemplateNodeCursor(); + + /** assignment operator + ** @param cursor object to be copied + ** @return reference to modified cursor (this object) + */ + DSRIncludedTemplateNodeCursor &operator=(const DSRIncludedTemplateNodeCursor &cursor); + + /** assignment operator. + * See comments on DSRTreeNodeCursor<>::setCursor() method. + ** @param node node to which the cursor should be set + ** @return reference to modified cursor (this object) + */ + DSRIncludedTemplateNodeCursor &operator=(DSRDocumentTreeNode *node); + + /** get pointer to first child node. + * Can be used to have a lookup to the first child node without changing the cursor. + ** @return pointer to first child node (if any), NULL otherwise + */ + virtual const DSRDocumentTreeNode *getChildNode() const; + + /** count number of children of the current node. + * This method iterates over all children of the current node, either on all + * sub-levels or on the first child level only. + ** @param searchIntoSub flag indicating whether to search into sub-trees + * ("deep search") or on the first child level only + ** @return number of children of the current node, 0 if none + */ + virtual size_t countChildNodes(const OFBool searchIntoSub = OFTrue) const; + + /** goto first child node (one level down) + ** @return ID of the first child node if successful, 0 otherwise + */ + virtual size_t goDown(); + + /** iterate over all nodes (starting from current position) + ** @param searchIntoSub flag indicating whether to search into sub-trees + * ("deep search") or on the current level only + ** @return ID of the next node if successful, 0 otherwise + */ + virtual size_t iterate(const OFBool searchIntoSub = OFTrue); +}; + + +#endif diff --git a/dcmsr/include/dcmtk/dcmsr/dsrnumtn.h b/dcmsr/include/dcmtk/dcmsr/dsrnumtn.h index c45af7ae..d0e11d3d 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrnumtn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrnumtn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,23 @@ class DCMTK_DCMSR_EXPORT DSRNumTreeNode */ virtual ~DSRNumTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrnumvl.h b/dcmsr/include/dcmtk/dcmsr/dsrnumvl.h index a4d9a0d6..6ac6812b 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrnumvl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrnumvl.h @@ -102,6 +102,25 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue */ DSRNumericMeasurementValue &operator=(const DSRNumericMeasurementValue &numericMeasurement); + /** comparison operator "equal". + * Two numeric measurement values are equal if the numeric value, the measurement unit + * and the value qualifier are equal. Other (additional) information is not used. + ** @param numericMeasurement numeric measurement value that should be compared to the + * current one + ** @return OFTrue if both numeric measurement values are equal, OFFalse otherwise + */ + OFBool operator==(const DSRNumericMeasurementValue &numericMeasurement) const; + + /** comparison operator "not equal". + * Two numeric measurement values are not equal if either the numeric value or the + * measurement unit or the value qualifier are not equal. Other (additional) information + * is not used for comparison. + ** @param numericMeasurement numeric measurement value that should be compared to the + * current one + ** @return OFTrue if both numeric measurement values are not equal, OFFalse otherwise + */ + OFBool operator!=(const DSRNumericMeasurementValue &numericMeasurement) const; + /** clear all internal variables. * Use this method to create an empty numeric measurement value. */ diff --git a/dcmsr/include/dcmtk/dcmsr/dsrpnmtn.h b/dcmsr/include/dcmtk/dcmsr/dsrpnmtn.h index 16c0a38a..3e758f04 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrpnmtn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrpnmtn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -68,6 +68,23 @@ class DCMTK_DCMSR_EXPORT DSRPNameTreeNode */ DSRPNameTreeNode(const DSRPNameTreeNode &node); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrprdcc.h b/dcmsr/include/dcmtk/dcmsr/dsrprdcc.h new file mode 100644 index 00000000..5b36055d --- /dev/null +++ b/dcmsr/include/dcmtk/dcmsr/dsrprdcc.h @@ -0,0 +1,94 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmsr + * + * Author: Joerg Riesmeier + * + * Purpose: + * classes: DSRPatientRadiationDoseSRConstraintChecker + * + */ + + +#ifndef DSRPRDCC_H +#define DSRPRDCC_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsriodcc.h" + + +/*---------------------* + * class declaration * + *---------------------*/ + +/** Class for checking the relationship content constraints of the Patient Radiation Dose + * SR IOD. + * According to DICOM PS 3.3: "The document shall be constructed from Baseline TID 10030 + * (Patient Radiation Dose) invoked at the root node." + */ +class DCMTK_DCMSR_EXPORT DSRPatientRadiationDoseSRConstraintChecker + : public DSRIODConstraintChecker +{ + + public: + + /** default constructor + */ + DSRPatientRadiationDoseSRConstraintChecker(); + + /** destructor + */ + virtual ~DSRPatientRadiationDoseSRConstraintChecker(); + + /** check whether by-reference relationships are allowed for this SR IOD + ** @return always returns OFFalse, i.e. by-reference relationships are not allowed + */ + virtual OFBool isByReferenceAllowed() const; + + /** check whether this SR IOD requires template support + ** @return always returns OFTrue, i.e. template support is required + */ + virtual OFBool isTemplateSupportRequired() const; + + /** get identifier and mapping resource of the root template (if any) + ** @param templateIdentifier identifier of the root template (might be empty) + * @param mappingResource mapping resource that defines the root template + * (might be empty) + ** @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition getRootTemplateIdentification(OFString &templateIdentifier, + OFString &mappingResource) const; + + /** get the associated document type of the SR IOD + ** @return document type (DSRTypes::DT_PatientRadiationDoseSR) + */ + virtual E_DocumentType getDocumentType() const; + + /** check whether specified content relationship is allowed for this IOD + ** @param sourceValueType value type of the source content item to be checked + * @param relationshipType type of relationship between source and target item + * @param targetValueType value type of the target content item to be checked + * @param byReference optional flag indicating whether the node/relationship + * should be added by-value (default) or by-reference + ** @return OFTrue if content relationship is allowed, OFFalse otherwise + */ + virtual OFBool checkContentRelationship(const E_ValueType sourceValueType, + const E_RelationshipType relationshipType, + const E_ValueType targetValueType, + const OFBool byReference = OFFalse) const; +}; + + +#endif diff --git a/dcmsr/include/dcmtk/dcmsr/dsrrtpl.h b/dcmsr/include/dcmtk/dcmsr/dsrrtpl.h index fa88f040..e64ef134 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrrtpl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrrtpl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -118,7 +118,20 @@ class DCMTK_DCMSR_EXPORT DSRRootTemplate */ virtual const DSRDocumentTree &getTree(); - /** insert tree from given template to internally stored document tree. + /** add extra content item to the current one (if the template is extensible). + * See DSRDocumentTree::addContentItem() for details. + ** @param relationshipType relationship type of node to be added with regard to + * the current one + * @param valueType value type of node to be added + * @param addMode flag specifying at which position to add the new node + * (e.g. after or below the current node) + ** @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition addExtraContentItem(const E_RelationshipType relationshipType, + const E_ValueType valueType, + const E_AddMode addMode = AM_afterCurrent); + + /** insert tree from given extra template to internally stored document tree. * If possible, this method adds a copy of the given tree to the current content item. * However, in case this template is non-extensible, an error code will be returned. ** @param subTemplate template that contains the tree that should be inserted @@ -129,9 +142,9 @@ class DCMTK_DCMSR_EXPORT DSRRootTemplate * type is used if the one of a top-level node is "unknown". ** @return status, EC_Normal if successful, an error code otherwise */ - virtual OFCondition insertTemplate(const DSRSubTemplate &subTemplate, - const E_AddMode addMode = AM_belowCurrent, - const E_RelationshipType defaultRelType = RT_unknown); + virtual OFCondition insertExtraTemplate(const DSRSubTemplate &subTemplate, + const E_AddMode addMode = AM_belowCurrent, + const E_RelationshipType defaultRelType = RT_unknown); // --- introduce some methods from base class to public API diff --git a/dcmsr/include/dcmtk/dcmsr/dsrscotn.h b/dcmsr/include/dcmtk/dcmsr/dsrscotn.h index 556a885b..d1260d5a 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrscotn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrscotn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,23 @@ class DCMTK_DCMSR_EXPORT DSRSCoordTreeNode */ virtual ~DSRSCoordTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrscovl.h b/dcmsr/include/dcmtk/dcmsr/dsrscovl.h index 2ead4997..081ac855 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrscovl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrscovl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -68,6 +68,20 @@ class DCMTK_DCMSR_EXPORT DSRSpatialCoordinatesValue */ DSRSpatialCoordinatesValue &operator=(const DSRSpatialCoordinatesValue &coordinatesValue); + /** comparison operator "equal" + ** @param coordinatesValue spatial coordinates value that should be compared to the + * current one + ** @return OFTrue if both spatial coordinates values are equal, OFFalse otherwise + */ + OFBool operator==(const DSRSpatialCoordinatesValue &coordinatesValue) const; + + /** comparison operator "not equal" + ** @param coordinatesValue spatial coordinates value that should be compared to the + * current one + ** @return OFTrue if both spatial coordinates values are not equal, OFFalse otherwise + */ + OFBool operator!=(const DSRSpatialCoordinatesValue &coordinatesValue) const; + /** clear all internal variables. * Graphic type is set to DSRTypes::GT_invalid. Since an empty list of graphic data is * invalid the spatial coordinates value becomes invalid afterwards. diff --git a/dcmsr/include/dcmtk/dcmsr/dsrstpl.h b/dcmsr/include/dcmtk/dcmsr/dsrstpl.h index 954ad583..f158986a 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrstpl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrstpl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -46,7 +46,7 @@ class DCMTK_DCMSR_EXPORT DSRSubTemplate public DSRTemplateCommon { // allow direct access to inherited getRoot() method - friend class DSRTreeNodeCursor; + friend class DSRIncludedTemplateNodeCursor; public: @@ -111,7 +111,20 @@ class DCMTK_DCMSR_EXPORT DSRSubTemplate */ virtual const DSRDocumentSubTree &getTree(); - /** insert tree from given template to internally stored subtree. + /** add extra content item to the current one (if the template is extensible). + * See DSRDocumentSubTree::addContentItem() for details. + ** @param relationshipType relationship type of node to be added with regard to + * the current one + * @param valueType value type of node to be added + * @param addMode flag specifying at which position to add the new node + * (e.g. after or below the current node) + ** @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition addExtraContentItem(const E_RelationshipType relationshipType, + const E_ValueType valueType, + const E_AddMode addMode = AM_afterCurrent); + + /** insert tree from given extra template to internally stored subtree. * If possible, this method adds a copy of the given tree to the current content item. * However, in case this template is non-extensible, an error code will be returned. ** @param subTemplate template that contains the tree that should be inserted @@ -122,9 +135,9 @@ class DCMTK_DCMSR_EXPORT DSRSubTemplate * type is used if the one of a top-level node is "unknown". ** @return status, EC_Normal if successful, an error code otherwise */ - virtual OFCondition insertTemplate(const DSRSubTemplate &subTemplate, - const E_AddMode addMode = AM_belowCurrent, - const E_RelationshipType defaultRelType = RT_unknown); + virtual OFCondition insertExtraTemplate(const DSRSubTemplate &subTemplate, + const E_AddMode addMode = AM_belowCurrent, + const E_RelationshipType defaultRelType = RT_unknown); // --- introduce some methods from base class to public API diff --git a/dcmsr/include/dcmtk/dcmsr/dsrstrvl.h b/dcmsr/include/dcmtk/dcmsr/dsrstrvl.h index 857d2a1b..e0a7e3da 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrstrvl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrstrvl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -67,6 +67,22 @@ class DCMTK_DCMSR_EXPORT DSRStringValue */ DSRStringValue &operator=(const DSRStringValue &stringValue); + /** comparison operator "equal". + * Please note that padding or other non-significant characters are not removed before + * comparing the two values, i.e. a simple character-by-character comparison is used. + ** @param stringValue string value that should be compared to the current one + ** @return OFTrue if both string values are equal, OFFalse otherwise + */ + OFBool operator==(const DSRStringValue &stringValue) const; + + /** comparison operator "not equal". + * Please note that padding or other non-significant characters are not removed before + * comparing the two values, i.e. a simple character-by-character comparison is used. + ** @param stringValue string value that should be compared to the current one + ** @return OFTrue if both string values are not equal, OFFalse otherwise + */ + OFBool operator!=(const DSRStringValue &stringValue) const; + /** clear all internal variables. * Please note that the string value might become invalid afterwards. */ @@ -95,7 +111,7 @@ class DCMTK_DCMSR_EXPORT DSRStringValue * If error/warning output is enabled, a warning message is printed if the string value * does not conform with the type (1), value multiplicity (1) and/or value representation. ** @param dataset DICOM dataset from which the string value should be read - * @param tagKey DICOM tag specifying the attribute which should be read + * @param tagKey DICOM tag specifying the attribute that should be read * @param flags flag used to customize the reading process (see DSRTypes::RF_xxx) ** @return status, EC_Normal if successful, an error code otherwise */ @@ -105,7 +121,7 @@ class DCMTK_DCMSR_EXPORT DSRStringValue /** write string value to dataset ** @param dataset DICOM dataset to which the string value should be written - * @param tagKey DICOM tag specifying the attribute which should be written + * @param tagKey DICOM tag specifying the attribute that should be written ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition write(DcmItem &dataset, diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtcotn.h b/dcmsr/include/dcmtk/dcmsr/dsrtcotn.h index bbdf86ab..1ec34d72 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrtcotn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrtcotn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,23 @@ class DCMTK_DCMSR_EXPORT DSRTCoordTreeNode */ virtual ~DSRTCoordTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtcovl.h b/dcmsr/include/dcmtk/dcmsr/dsrtcovl.h index 607ebf58..3bf99b91 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrtcovl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrtcovl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -64,12 +64,26 @@ class DCMTK_DCMSR_EXPORT DSRTemporalCoordinatesValue virtual ~DSRTemporalCoordinatesValue(); /** assignment operator - ** @param coordinatesValue Temporal coordinates value to be copied (not checked !) - ** @return reference to this Temporal coordinates value after 'coordinatesValue' has + ** @param coordinatesValue temporal coordinates value to be copied (not checked !) + ** @return reference to this temporal coordinates value after 'coordinatesValue' has * been copied */ DSRTemporalCoordinatesValue &operator=(const DSRTemporalCoordinatesValue &coordinatesValue); + /** comparison operator "equal" + ** @param coordinatesValue temporal coordinates value that should be compared to the + * current one + ** @return OFTrue if both temporal coordinates values are equal, OFFalse otherwise + */ + OFBool operator==(const DSRTemporalCoordinatesValue &coordinatesValue) const; + + /** comparison operator "not equal" + ** @param coordinatesValue temporal coordinates value that should be compared to the + * current one + ** @return OFTrue if both temporal coordinates values are not equal, OFFalse otherwise + */ + OFBool operator!=(const DSRTemporalCoordinatesValue &coordinatesValue) const; + /** clear all internal variables. * Temporal range type is set to DSRTypes::TRT_invalid. Since an empty list of graphic data * is invalid the temporal coordinates value becomes invalid afterwards. diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtextn.h b/dcmsr/include/dcmtk/dcmsr/dsrtextn.h index cfbfea7c..183ec4aa 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrtextn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrtextn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -72,6 +72,23 @@ class DCMTK_DCMSR_EXPORT DSRTextTreeNode */ virtual ~DSRTextTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtimtn.h b/dcmsr/include/dcmtk/dcmsr/dsrtimtn.h index b9fcd098..4822c7bb 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrtimtn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrtimtn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -72,6 +72,23 @@ class DCMTK_DCMSR_EXPORT DSRTimeTreeNode */ virtual ~DSRTimeTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtlist.h b/dcmsr/include/dcmtk/dcmsr/dsrtlist.h index 2e18713d..82838d01 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrtlist.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrtlist.h @@ -93,6 +93,54 @@ template class DSRListOfItems return *this; } + /** comparison operator "equal" + ** @param lst list that should be compared to the current one + ** @return OFTrue if both lists are equal, OFFalse otherwise + */ + OFBool operator==(const DSRListOfItems &lst) const + { + /* first check whether the size of both lists is equal */ + OFBool result = (ItemList.size() == lst.ItemList.size()); + /* then iterate over all list entries (if any) */ + if (result && !ItemList.empty()) + { + /* since OFList does not implement a comparison operator we need the following */ + const OFLIST_TYPENAME OFListConstIterator(T) endPos = ItemList.end(); + OFLIST_TYPENAME OFListConstIterator(T) iterator = ItemList.begin(); + OFLIST_TYPENAME OFListConstIterator(T) lstIter = lst.ItemList.begin(); + do { + result = (*iterator == *lstIter); + iterator++; + lstIter++; + } while (result && (iterator != endPos)); + } + return result; + } + + /** comparison operator "not equal" + ** @param lst list that should be compared to the current one + ** @return OFTrue if both lists are not equal, OFFalse otherwise + */ + OFBool operator!=(const DSRListOfItems &lst) const + { + /* first check whether the size of both lists is not equal */ + OFBool result = (ItemList.size() != lst.ItemList.size()); + /* then iterate over all list entries (if any) */ + if (!result && !ItemList.empty()) + { + /* since OFList does not implement a comparison operator we need the following */ + const OFLIST_TYPENAME OFListConstIterator(T) endPos = ItemList.end(); + OFLIST_TYPENAME OFListConstIterator(T) iterator = ItemList.begin(); + OFLIST_TYPENAME OFListConstIterator(T) lstIter = lst.ItemList.begin(); + do { + result = (*iterator != *lstIter); + iterator++; + lstIter++; + } while (!result && (iterator != endPos)); + } + return result; + } + /** clear all internal variables */ inline void clear() diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtnant.h b/dcmsr/include/dcmtk/dcmsr/dsrtnant.h index 18bb4eda..8f4a93ca 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrtnant.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrtnant.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -63,7 +63,7 @@ class DSRTreeNodeAnnotation /** comparison operator. * Two annotations are equal, if the internally stored character strings (text) * have the same value. - ** @param annotation annotation which should be compared to the current one + ** @param annotation annotation that should be compared to the current one ** @return OFTrue if both annotations are equal, OFFalse otherwise */ OFBool operator==(const DSRTreeNodeAnnotation &annotation) const @@ -74,7 +74,7 @@ class DSRTreeNodeAnnotation /** comparison operator. * Two annotations are not equal, if the internally stored character strings * (text) have different values. - ** @param annotation annotation which should be compared to the current one + ** @param annotation annotation that should be compared to the current one ** @return OFTrue if both annotations are not equal, OFFalse otherwise */ OFBool operator!=(const DSRTreeNodeAnnotation &annotation) const diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtncsr.h b/dcmsr/include/dcmtk/dcmsr/dsrtncsr.h index d3e0d4e7..58a890b6 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrtncsr.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrtncsr.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -46,10 +46,8 @@ class DSRTreeNode; /** Class implementing a tree node cursor. ** @tparam T template type used for the tree node pointers - * @tparam B boolean flag that indicates whether to treat certain tree nodes - * differently (depends on the particular implementation) */ -template +template class DSRTreeNodeCursor { @@ -62,7 +60,7 @@ class DSRTreeNodeCursor /** copy constructor ** @param cursor object to be copied */ - DSRTreeNodeCursor(const DSRTreeNodeCursor &cursor); + DSRTreeNodeCursor(const DSRTreeNodeCursor &cursor); /** constructor. * See comments on setCursor(T*) method. @@ -81,14 +79,14 @@ class DSRTreeNodeCursor ** @param cursor object to be copied ** @return reference to modified cursor (this object) */ - DSRTreeNodeCursor &operator=(const DSRTreeNodeCursor &cursor); + DSRTreeNodeCursor &operator=(const DSRTreeNodeCursor &cursor); /** assignment operator. * See comments on setCursor(T*) method. ** @param node node to which the cursor should be set ** @return reference to modified cursor (this object) */ - DSRTreeNodeCursor &operator=(T *node); + DSRTreeNodeCursor &operator=(T *node); /** clear all member variables. * The cursor becomes invalid afterwards (same state as after default construction). @@ -107,7 +105,7 @@ class DSRTreeNodeCursor * ("deep search") or on the first child level only ** @return number of children of the current node, 0 if none */ - size_t countChildNodes(const OFBool searchIntoSub = OFTrue) const; + virtual size_t countChildNodes(const OFBool searchIntoSub = OFTrue) const; /** check whether the current node has a parent ** @return OFTrue if the current node has a parent, OFFalse otherwise @@ -167,56 +165,56 @@ class DSRTreeNodeCursor * Please note that the first node might be identical to the current node. ** @return ID of the first node if successful, 0 otherwise */ - size_t gotoFirst(); + virtual size_t gotoFirst(); /** goto last node on the same level (last sibling). * Please note that the last node might be identical to the current node. ** @return ID of the last node if successful, 0 otherwise */ - size_t gotoLast(); + virtual size_t gotoLast(); /** goto previous node on the same level (preceding sibling) ** @return ID of the previous node if successful, 0 otherwise */ - size_t gotoPrevious(); + virtual size_t gotoPrevious(); /** goto next node on the same level (following sibling) ** @return ID of the next node if successful, 0 otherwise */ - size_t gotoNext(); + virtual size_t gotoNext(); /** goto parent node (one level up) ** @return ID of the parent node if successful, 0 otherwise */ - size_t goUp(); + virtual size_t goUp(); /** goto first child node (one level down) ** @return ID of the first child node if successful, 0 otherwise */ - size_t goDown(); + virtual size_t goDown(); /** @copydoc goUp() */ - inline size_t gotoParent(); + virtual size_t gotoParent(); /** @copydoc goDown() */ - inline size_t gotoChild(); + virtual size_t gotoChild(); - /** iterate over all nodes. Starts from current position! + /** iterate over all nodes (starting from current position!) ** @param searchIntoSub flag indicating whether to search into sub-trees * ("deep search") or on the current level only ** @return ID of the next node if successful, 0 otherwise */ - size_t iterate(const OFBool searchIntoSub = OFTrue); + virtual size_t iterate(const OFBool searchIntoSub = OFTrue); - /** set cursor to specified node. Starts from current position! + /** set cursor to specified node. Starts search from current position. ** @param searchID ID of the node to set the cursor to ** @return ID of the new current node if successful, 0 otherwise */ size_t gotoNode(const size_t searchID); - /** set cursor to specified node. Starts from current position! + /** set cursor to specified node. Starts search from current position. ** @param position position string of the node to set the cursor to. * (the format is e.g. "1.2.3" for the third child of the * second child of the first node - see getPosition()). @@ -226,12 +224,19 @@ class DSRTreeNodeCursor size_t gotoNode(const OFString &position, const char separator = '.'); - /** set cursor to specified node. Starts from current position! + /** set cursor to specified node. Starts search from current position. ** @param annotation annotation of the node to set the cursor to ** @return ID of the new current node if successful, 0 otherwise */ size_t gotoNode(const DSRTreeNodeAnnotation &annotation); + /** set cursor to specified node. Starts search from current position. + * This method requires that T implements the comparison operator "not equal". + ** @param nodeValue value of the node to set the cursor to + ** @return ID of the new current node if successful, 0 otherwise + */ + size_t gotoNode(const T &nodeValue); + /** get current node ID. * The node ID uniquely identifies a content item in the document tree. Most of * the navigation methods above do return this ID too. @@ -276,12 +281,12 @@ class DSRTreeNodeCursor /** get cursor ** @return reference to cursor (this object) */ - inline const DSRTreeNodeCursor &getCursor() const; + inline const DSRTreeNodeCursor &getCursor() const; /** set cursor to specified object ** @param cursor object to set this cursor to */ - inline void setCursor(const DSRTreeNodeCursor &cursor); + inline void setCursor(const DSRTreeNodeCursor &cursor); /** set cursor to specified node. * Clears the internal position counter and sets the position of the current level @@ -310,8 +315,8 @@ class DSRTreeNodeCursor * implementation * *------------------*/ -template -DSRTreeNodeCursor::DSRTreeNodeCursor() +template +DSRTreeNodeCursor::DSRTreeNodeCursor() : NodeCursor(NULL), NodeCursorStack(), Position() @@ -319,8 +324,8 @@ DSRTreeNodeCursor::DSRTreeNodeCursor() } -template -DSRTreeNodeCursor::DSRTreeNodeCursor(const DSRTreeNodeCursor &cursor) +template +DSRTreeNodeCursor::DSRTreeNodeCursor(const DSRTreeNodeCursor &cursor) : NodeCursor(cursor.NodeCursor), NodeCursorStack(cursor.NodeCursorStack), Position(cursor.Position) @@ -328,9 +333,9 @@ DSRTreeNodeCursor::DSRTreeNodeCursor(const DSRTreeNodeCursor &cursor } -template -DSRTreeNodeCursor::DSRTreeNodeCursor(T *node, - const DSRPositionCounter *position) +template +DSRTreeNodeCursor::DSRTreeNodeCursor(T *node, + const DSRPositionCounter *position) : NodeCursor(node), NodeCursorStack(), Position() @@ -347,30 +352,30 @@ DSRTreeNodeCursor::DSRTreeNodeCursor(T *node, } -template -DSRTreeNodeCursor::~DSRTreeNodeCursor() +template +DSRTreeNodeCursor::~DSRTreeNodeCursor() { } -template -DSRTreeNodeCursor &DSRTreeNodeCursor::operator=(const DSRTreeNodeCursor &cursor) +template +DSRTreeNodeCursor &DSRTreeNodeCursor::operator=(const DSRTreeNodeCursor &cursor) { setCursor(cursor); return *this; } -template -DSRTreeNodeCursor &DSRTreeNodeCursor::operator=(T *node) +template +DSRTreeNodeCursor &DSRTreeNodeCursor::operator=(T *node) { setCursor(node); return *this; } -template -void DSRTreeNodeCursor::clear() +template +void DSRTreeNodeCursor::clear() { NodeCursor = NULL; clearNodeCursorStack(); @@ -378,29 +383,29 @@ void DSRTreeNodeCursor::clear() } -template -OFBool DSRTreeNodeCursor::isValid() const +template +OFBool DSRTreeNodeCursor::isValid() const { return (NodeCursor != NULL); } -template -void DSRTreeNodeCursor::clearNodeCursorStack() +template +void DSRTreeNodeCursor::clearNodeCursorStack() { while (!NodeCursorStack.empty()) NodeCursorStack.pop(); } -template -size_t DSRTreeNodeCursor::countChildNodes(const OFBool searchIntoSub) const +template +size_t DSRTreeNodeCursor::countChildNodes(const OFBool searchIntoSub) const { size_t count = 0; if (NodeCursor != NULL) { /* do we have any children at all? */ - DSRTreeNodeCursor cursor(NodeCursor->getDown()); + DSRTreeNodeCursor cursor(NodeCursor->getDown()); if (cursor.isValid()) { /* iterate over all child nodes */ @@ -413,50 +418,50 @@ size_t DSRTreeNodeCursor::countChildNodes(const OFBool searchIntoSub) cons } -template -OFBool DSRTreeNodeCursor::hasParentNode() const +template +OFBool DSRTreeNodeCursor::hasParentNode() const { return ((NodeCursor != NULL) && !NodeCursorStack.empty()); } -template -OFBool DSRTreeNodeCursor::hasChildNodes() const +template +OFBool DSRTreeNodeCursor::hasChildNodes() const { return (getChildNode() != NULL); } -template -OFBool DSRTreeNodeCursor::hasPreviousNode() const +template +OFBool DSRTreeNodeCursor::hasPreviousNode() const { return (getPreviousNode() != NULL); } -template -OFBool DSRTreeNodeCursor::hasNextNode() const +template +OFBool DSRTreeNodeCursor::hasNextNode() const { return (getNextNode() != NULL); } -template -OFBool DSRTreeNodeCursor::hasSiblingNodes() const +template +OFBool DSRTreeNodeCursor::hasSiblingNodes() const { return (getPreviousNode() != NULL) || (getNextNode() != NULL); } -template -T *DSRTreeNodeCursor::getNode() const +template +T *DSRTreeNodeCursor::getNode() const { return NodeCursor; } -template -const T *DSRTreeNodeCursor::getParentNode() const +template +const T *DSRTreeNodeCursor::getParentNode() const { T *node = NULL; if (hasParentNode()) @@ -465,8 +470,8 @@ const T *DSRTreeNodeCursor::getParentNode() const } -template -const T *DSRTreeNodeCursor::getChildNode() const +template +const T *DSRTreeNodeCursor::getChildNode() const { T *node = NULL; if (NodeCursor != NULL) @@ -475,8 +480,8 @@ const T *DSRTreeNodeCursor::getChildNode() const } -template -const T *DSRTreeNodeCursor::getPreviousNode() const +template +const T *DSRTreeNodeCursor::getPreviousNode() const { T *node = NULL; if (NodeCursor != NULL) @@ -485,8 +490,8 @@ const T *DSRTreeNodeCursor::getPreviousNode() const } -template -const T *DSRTreeNodeCursor::getNextNode() const +template +const T *DSRTreeNodeCursor::getNextNode() const { T *node = NULL; if (NodeCursor != NULL) @@ -495,15 +500,15 @@ const T *DSRTreeNodeCursor::getNextNode() const } -template -const DSRTreeNodeCursor &DSRTreeNodeCursor::getCursor() const +template +const DSRTreeNodeCursor &DSRTreeNodeCursor::getCursor() const { return *this; } -template -void DSRTreeNodeCursor::setCursor(const DSRTreeNodeCursor &cursor) +template +void DSRTreeNodeCursor::setCursor(const DSRTreeNodeCursor &cursor) { NodeCursor = cursor.NodeCursor; NodeCursorStack = cursor.NodeCursorStack; @@ -511,8 +516,8 @@ void DSRTreeNodeCursor::setCursor(const DSRTreeNodeCursor &cursor) } -template -size_t DSRTreeNodeCursor::setCursor(T *node) +template +size_t DSRTreeNodeCursor::setCursor(T *node) { size_t nodeID = 0; NodeCursor = node; @@ -524,8 +529,8 @@ size_t DSRTreeNodeCursor::setCursor(T *node) } -template -T *DSRTreeNodeCursor::getChild() const +template +T *DSRTreeNodeCursor::getChild() const { T *node = NULL; if (NodeCursor != NULL) @@ -534,8 +539,8 @@ T *DSRTreeNodeCursor::getChild() const } -template -size_t DSRTreeNodeCursor::gotoFirst() +template +size_t DSRTreeNodeCursor::gotoFirst() { size_t nodeID = 0; if (NodeCursor != NULL) @@ -551,8 +556,8 @@ size_t DSRTreeNodeCursor::gotoFirst() } -template -size_t DSRTreeNodeCursor::gotoLast() +template +size_t DSRTreeNodeCursor::gotoLast() { size_t nodeID = 0; if (NodeCursor != NULL) @@ -568,8 +573,8 @@ size_t DSRTreeNodeCursor::gotoLast() } -template -size_t DSRTreeNodeCursor::gotoPrevious() +template +size_t DSRTreeNodeCursor::gotoPrevious() { size_t nodeID = 0; if (NodeCursor != NULL) @@ -585,8 +590,8 @@ size_t DSRTreeNodeCursor::gotoPrevious() } -template -size_t DSRTreeNodeCursor::gotoNext() +template +size_t DSRTreeNodeCursor::gotoNext() { size_t nodeID = 0; if (NodeCursor != NULL) @@ -602,8 +607,8 @@ size_t DSRTreeNodeCursor::gotoNext() } -template -size_t DSRTreeNodeCursor::goUp() +template +size_t DSRTreeNodeCursor::goUp() { size_t nodeID = 0; if (NodeCursor != NULL) @@ -624,8 +629,8 @@ size_t DSRTreeNodeCursor::goUp() } -template -size_t DSRTreeNodeCursor::goDown() +template +size_t DSRTreeNodeCursor::goDown() { size_t nodeID = 0; if (NodeCursor != NULL) @@ -642,22 +647,22 @@ size_t DSRTreeNodeCursor::goDown() } -template -size_t DSRTreeNodeCursor::gotoParent() +template +size_t DSRTreeNodeCursor::gotoParent() { return goUp(); } -template -size_t DSRTreeNodeCursor::gotoChild() +template +size_t DSRTreeNodeCursor::gotoChild() { return goDown(); } -template -size_t DSRTreeNodeCursor::iterate(const OFBool searchIntoSub) +template +size_t DSRTreeNodeCursor::iterate(const OFBool searchIntoSub) { size_t nodeID = 0; if (NodeCursor != NULL) @@ -702,8 +707,8 @@ size_t DSRTreeNodeCursor::iterate(const OFBool searchIntoSub) } -template -size_t DSRTreeNodeCursor::gotoNode(const size_t searchID) +template +size_t DSRTreeNodeCursor::gotoNode(const size_t searchID) { size_t nodeID = 0; if (searchID > 0) @@ -719,9 +724,9 @@ size_t DSRTreeNodeCursor::gotoNode(const size_t searchID) } -template -size_t DSRTreeNodeCursor::gotoNode(const OFString &position, - const char separator) +template +size_t DSRTreeNodeCursor::gotoNode(const OFString &position, + const char separator) { size_t nodeID = 0; if (!position.empty()) @@ -766,8 +771,8 @@ size_t DSRTreeNodeCursor::gotoNode(const OFString &position, } -template -size_t DSRTreeNodeCursor::gotoNode(const DSRTreeNodeAnnotation &annotation) +template +size_t DSRTreeNodeCursor::gotoNode(const DSRTreeNodeAnnotation &annotation) { size_t nodeID = 0; if (!annotation.isEmpty()) @@ -783,8 +788,22 @@ size_t DSRTreeNodeCursor::gotoNode(const DSRTreeNodeAnnotation &annotation } -template -size_t DSRTreeNodeCursor::getNodeID() const +template +size_t DSRTreeNodeCursor::gotoNode(const T &nodeValue) +{ + size_t nodeID = 0; + if (NodeCursor != NULL) + { + nodeID = NodeCursor->getIdent(); + while ((nodeID > 0) && (*NodeCursor != nodeValue)) + nodeID = iterate(); + } + return nodeID; +} + + +template +size_t DSRTreeNodeCursor::getNodeID() const { size_t nodeID = 0; if (NodeCursor != NULL) @@ -793,8 +812,8 @@ size_t DSRTreeNodeCursor::getNodeID() const } -template -size_t DSRTreeNodeCursor::getLevel() const +template +size_t DSRTreeNodeCursor::getLevel() const { size_t level = 0; if (NodeCursor != NULL) @@ -803,16 +822,16 @@ size_t DSRTreeNodeCursor::getLevel() const } -template -DSRPositionCounter &DSRTreeNodeCursor::getPositionCounter() +template +DSRPositionCounter &DSRTreeNodeCursor::getPositionCounter() { return Position; } -template -const OFString &DSRTreeNodeCursor::getPosition(OFString &position, - const char separator) const +template +const OFString &DSRTreeNodeCursor::getPosition(OFString &position, + const char separator) const { return Position.getString(position, separator); } diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtree.h b/dcmsr/include/dcmtk/dcmsr/dsrtree.h index aaaaabb8..ce1360e6 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrtree.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrtree.h @@ -265,7 +265,7 @@ template class DSRTree size_t gotoNode(const OFString &reference, const OFBool startFromRoot = OFTrue); - /** set cursor to specified node. Starts from current position! + /** set internal cursor to specified node ** @param annotation annotation of the node to set the cursor to * @param startFromRoot flag indicating whether to start from the root node * or the current one @@ -274,6 +274,16 @@ template class DSRTree size_t gotoNode(const DSRTreeNodeAnnotation &annotation, const OFBool startFromRoot = OFTrue); + /** set internal cursor to specified node (given by its value). + * This method requires that T implements the comparison operator "not equal". + ** @param nodeValue value of the node to set the cursor to + * @param startFromRoot flag indicating whether to start from the root node + * or the current one + ** @return ID of the new current node if successful, 0 otherwise + */ + size_t gotoNode(const T &nodeValue, + const OFBool startFromRoot = OFTrue); + /** add new node to the current one. * Please note that no copy of the given node is created. Therefore, the node * should be created with new() - do not use a reference to a local variable. @@ -318,13 +328,13 @@ template class DSRTree */ virtual size_t removeNode(); - /** extract a subtree i.e.\ a fragment from this tree. + /** extract a subtree, i.e.\ a fragment from this tree. * The subtree is specified by the current node, which becomes the root of the subtree. ** @return pointer to the extracted subtree, NULL in case of error */ virtual DSRTree *extractSubTree(); - /** clone a subtree i.e.\ a fragment of this tree. + /** clone a subtree, i.e.\ a fragment of this tree. * The cloning starts with the current node and ends with the given node. ** @param stopAfterNodeID ID of the node after which the cloning should stop. * By default (0), the process ends after cloning the @@ -343,7 +353,8 @@ template class DSRTree DSRTree(T *rootNode); /** special copy constructor that clones a particular subtree only - ** @param startCursor first node of the subtree to be copied + ** @param startCursor cursor pointing to first node of the subtree to be + * copied * @param stopAfterNodeID ID of the node after which the cloning should stop */ DSRTree(const DSRTreeNodeCursor &startCursor, @@ -661,6 +672,17 @@ size_t DSRTree::gotoNode(const DSRTreeNodeAnnotation &annotation, } +template +size_t DSRTree::gotoNode(const T &nodeValue, + const OFBool startFromRoot) +{ + if (startFromRoot) + gotoRoot(); + /* call the real function */ + return DSRTreeNodeCursor::gotoNode(nodeValue); +} + + template size_t DSRTree::addNode(T *node, const E_AddMode addMode) diff --git a/dcmsr/include/dcmtk/dcmsr/dsruidtn.h b/dcmsr/include/dcmtk/dcmsr/dsruidtn.h index be2ede3d..5c1ea061 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsruidtn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsruidtn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -72,6 +72,23 @@ class DCMTK_DCMSR_EXPORT DSRUIDRefTreeNode */ virtual ~DSRUIDRefTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrwavtn.h b/dcmsr/include/dcmtk/dcmsr/dsrwavtn.h index f45db76b..87be60aa 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrwavtn.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrwavtn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,23 @@ class DCMTK_DCMSR_EXPORT DSRWaveformTreeNode */ virtual ~DSRWaveformTreeNode(); + /** comparison operator "equal". + * Two tree nodes are equal if the comparison operator of the base class DSRDocumentTreeNode + * regards them as "equal" (same types and concept names) and the stored values are equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are equal, OFFalse otherwise + */ + virtual OFBool operator==(const DSRDocumentTreeNode &node) const; + + /** comparison operator "not equal". + * Two tree nodes are not equal if either the comparison operator of the base class + * DSRDocumentTreeNode regards them as "not equal" (different types or concept names) or + * the stored values are not equal. + ** @param node tree node that should be compared to the current one + ** @return OFTrue if both tree nodes are not equal, OFFalse otherwise + */ + virtual OFBool operator!=(const DSRDocumentTreeNode &node) const; + /** clone this tree node. * Internally, the copy constructor is used, so the corresponding comments apply. ** @return copy of this tree node diff --git a/dcmsr/include/dcmtk/dcmsr/dsrwavvl.h b/dcmsr/include/dcmtk/dcmsr/dsrwavvl.h index 5af36b07..c8b457d2 100644 --- a/dcmsr/include/dcmtk/dcmsr/dsrwavvl.h +++ b/dcmsr/include/dcmtk/dcmsr/dsrwavvl.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -77,6 +77,18 @@ class DCMTK_DCMSR_EXPORT DSRWaveformReferenceValue */ DSRWaveformReferenceValue &operator=(const DSRWaveformReferenceValue &referenceValue); + /** comparison operator "equal" + ** @param referenceValue waveform reference value that should be compared to the current one + ** @return OFTrue if both waveform reference values are equal, OFFalse otherwise + */ + OFBool operator==(const DSRWaveformReferenceValue &referenceValue) const; + + /** comparison operator "not equal" + ** @param referenceValue waveform reference value that should be compared to the current one + ** @return OFTrue if both waveform reference values are not equal, OFFalse otherwise + */ + OFBool operator!=(const DSRWaveformReferenceValue &referenceValue) const; + /** clear all internal variables. * Since an empty waveform reference is invalid the reference becomes invalid afterwards. */ @@ -204,7 +216,7 @@ class DCMTK_DCMSR_EXPORT DSRWaveformReferenceValue /** check the specified SOP class UID for validity. * This method further specializes the checks performed in the base class * DSRCompositeReferenceValue. All waveform SOP classes that are defined - * in DICOM PS 3.6-2015c are allowed. + * in DICOM PS 3.6-2017e are allowed. ** @param sopClassUID SOP class UID to be checked ** @return status, EC_Normal if value is valid, an error code otherwise */ diff --git a/dcmsr/libcmr/CMakeLists.txt b/dcmsr/libcmr/CMakeLists.txt index 8c670bae..72c544cc 100644 --- a/dcmsr/libcmr/CMakeLists.txt +++ b/dcmsr/libcmr/CMakeLists.txt @@ -1,4 +1,4 @@ # create library from source files -DCMTK_ADD_LIBRARY(cmr init logger srnumvl tid1001 tid1204 tid1411 tid1500 tid1600 cid11 cid29 cid29e cid42 cid100 cid244 cid244e cid4020 cid4021 cid4031 cid4031e cid5000 cid5001 cid6147 cid7021 cid7181 cid7445 cid7452 cid7453 cid7464 cid7469 cid10013 cid10013e cid10033 cid10033e) +DCMTK_ADD_LIBRARY(cmr init logger srnumvl tid300 tid1001 tid1204 tid1411 tid1419m tid1500 tid1501 tid15def tid1600 cid11 cid29 cid29e cid42 cid100 cid244 cid244e cid4020 cid4021 cid4031 cid4031e cid5000 cid5001 cid6147 cid7021 cid7181 cid7445 cid7452 cid7453 cid7464 cid7469 cid10013 cid10013e cid10033 cid10033e) DCMTK_TARGET_LINK_MODULES(cmr dcmsr) diff --git a/dcmsr/libcmr/Makefile.dep b/dcmsr/libcmr/Makefile.dep index a7af8e82..7b2536f3 100644 --- a/dcmsr/libcmr/Makefile.dep +++ b/dcmsr/libcmr/Makefile.dep @@ -1,5 +1,5 @@ -cid100.o: cid100.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsr/cmr/cid100.h ../include/dcmtk/dcmsr/dsrctxgr.h \ +cid10013.o: cid10013.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/cid10013.h ../include/dcmtk/dcmsr/dsrctxgr.h \ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../include/dcmtk/dcmsr/dsdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -63,7 +63,8 @@ cid100.o: cid100.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../include/dcmtk/dcmsr/cmr/define.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h -cid10013.o: cid10013.cc ../../config/include/dcmtk/config/osconfig.h \ +cid10013e.o: cid10013e.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/cid10013e.h \ ../include/dcmtk/dcmsr/cmr/cid10013.h ../include/dcmtk/dcmsr/dsrctxgr.h \ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../include/dcmtk/dcmsr/dsdefine.h \ @@ -128,9 +129,8 @@ cid10013.o: cid10013.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../include/dcmtk/dcmsr/cmr/define.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h -cid10013e.o: cid10013e.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsr/cmr/cid10013e.h \ - ../include/dcmtk/dcmsr/cmr/cid10013.h ../include/dcmtk/dcmsr/dsrctxgr.h \ +cid10033.o: cid10033.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/cid10033.h ../include/dcmtk/dcmsr/dsrctxgr.h \ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../include/dcmtk/dcmsr/dsdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -194,7 +194,8 @@ cid10013e.o: cid10013e.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../include/dcmtk/dcmsr/cmr/define.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h -cid10033.o: cid10033.cc ../../config/include/dcmtk/config/osconfig.h \ +cid10033e.o: cid10033e.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/cid10033e.h \ ../include/dcmtk/dcmsr/cmr/cid10033.h ../include/dcmtk/dcmsr/dsrctxgr.h \ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../include/dcmtk/dcmsr/dsdefine.h \ @@ -259,9 +260,8 @@ cid10033.o: cid10033.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../include/dcmtk/dcmsr/cmr/define.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h -cid10033e.o: cid10033e.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsr/cmr/cid10033e.h \ - ../include/dcmtk/dcmsr/cmr/cid10033.h ../include/dcmtk/dcmsr/dsrctxgr.h \ +cid100.o: cid100.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/cid100.h ../include/dcmtk/dcmsr/dsrctxgr.h \ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../include/dcmtk/dcmsr/dsdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -1892,7 +1892,11 @@ tid1001.o: tid1001.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -1979,7 +1983,11 @@ tid1204.o: tid1204.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -2065,7 +2073,113 @@ tid1411.o: tid1411.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrnumvl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ + ../include/dcmtk/dcmsr/dsrscovl.h ../include/dcmtk/dcmsr/dsrscogr.h \ + ../include/dcmtk/dcmsr/dsrtlist.h ../include/dcmtk/dcmsr/dsrsc3vl.h \ + ../include/dcmtk/dcmsr/dsrsc3gr.h ../include/dcmtk/dcmsr/dsrtcovl.h \ + ../include/dcmtk/dcmsr/dsrtcodt.h ../include/dcmtk/dcmsr/dsrtcosp.h \ + ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \ + ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \ + ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \ + ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \ + ../include/dcmtk/dcmsr/cmr/define.h \ + ../include/dcmtk/dcmsr/cmr/srnumvlu.h \ + ../include/dcmtk/dcmsr/cmr/srnumvl.h ../include/dcmtk/dcmsr/cmr/cid42.h \ + ../include/dcmtk/dcmsr/dsrctxgr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../include/dcmtk/dcmsr/cmr/tid1419m.h \ + ../include/dcmtk/dcmsr/cmr/cid244e.h ../include/dcmtk/dcmsr/cmr/cid244.h \ + ../include/dcmtk/dcmsr/cmr/cid6147.h \ + ../include/dcmtk/dcmsr/cmr/cid7181.h \ + ../include/dcmtk/dcmsr/cmr/cid7464.h \ + ../include/dcmtk/dcmsr/cmr/cid7469.h \ + ../include/dcmtk/dcmsr/cmr/tid15def.h \ + ../include/dcmtk/dcmsr/cmr/logger.h ../include/dcmtk/dcmsr/codes/dcm.h \ + ../include/dcmtk/dcmsr/codes/ncit.h ../include/dcmtk/dcmsr/codes/srt.h \ + ../include/dcmtk/dcmsr/codes/umls.h ../include/dcmtk/dcmsr/dsrtpltn.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h +tid1419m.o: tid1419m.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/tid1419m.h ../include/dcmtk/dcmsr/dsrstpl.h \ + ../include/dcmtk/dcmsr/dsrdoctr.h ../include/dcmtk/dcmsr/dsrdocst.h \ + ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtypes.h \ + ../include/dcmtk/dcmsr/dsdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ + ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \ + ../include/dcmtk/dcmsr/dsrtnant.h \ + ../../ofstd/include/dcmtk/ofstd/ofstack.h \ + ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ + ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -2083,12 +2197,13 @@ tid1411.o: tid1411.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/cmr/srnumvl.h ../include/dcmtk/dcmsr/cmr/cid42.h \ ../include/dcmtk/dcmsr/dsrctxgr.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../include/dcmtk/dcmsr/cmr/cid244e.h ../include/dcmtk/dcmsr/cmr/cid244.h \ + ../include/dcmtk/dcmsr/cmr/tid15def.h \ ../include/dcmtk/dcmsr/cmr/cid6147.h \ ../include/dcmtk/dcmsr/cmr/cid7181.h \ ../include/dcmtk/dcmsr/cmr/cid7464.h \ ../include/dcmtk/dcmsr/cmr/cid7469.h ../include/dcmtk/dcmsr/cmr/logger.h \ - ../include/dcmtk/dcmsr/codes/dcm.h ../include/dcmtk/dcmsr/codes/ncit.h \ - ../include/dcmtk/dcmsr/codes/srt.h ../include/dcmtk/dcmsr/codes/umls.h \ + ../include/dcmtk/dcmsr/codes/dcm.h ../include/dcmtk/dcmsr/codes/srt.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h tid1500.o: tid1500.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -2159,7 +2274,11 @@ tid1500.o: tid1500.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -2184,17 +2303,134 @@ tid1500.o: tid1500.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/cmr/tid1411.h \ ../include/dcmtk/dcmsr/cmr/srnumvlu.h \ ../include/dcmtk/dcmsr/cmr/srnumvl.h ../include/dcmtk/dcmsr/cmr/cid42.h \ + ../include/dcmtk/dcmsr/cmr/tid1419m.h \ + ../include/dcmtk/dcmsr/cmr/cid244e.h ../include/dcmtk/dcmsr/cmr/cid244.h \ + ../include/dcmtk/dcmsr/cmr/cid6147.h \ + ../include/dcmtk/dcmsr/cmr/cid7181.h \ + ../include/dcmtk/dcmsr/cmr/cid7464.h \ + ../include/dcmtk/dcmsr/cmr/cid7469.h \ + ../include/dcmtk/dcmsr/cmr/tid1501.h ../include/dcmtk/dcmsr/cmr/tid300.h \ ../include/dcmtk/dcmsr/cmr/tid1600.h \ ../include/dcmtk/dcmsr/cmr/cid4020.h \ ../include/dcmtk/dcmsr/cmr/cid4021.h ../include/dcmtk/dcmsr/cmr/cid100.h \ - ../include/dcmtk/dcmsr/cmr/cid6147.h \ ../include/dcmtk/dcmsr/cmr/cid7021.h \ + ../include/dcmtk/dcmsr/cmr/tid15def.h \ + ../include/dcmtk/dcmsr/cmr/logger.h ../include/dcmtk/dcmsr/codes/dcm.h \ + ../include/dcmtk/dcmsr/codes/umls.h ../include/dcmtk/dcmsr/dsrtpltn.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h +tid1501.o: tid1501.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/tid1501.h ../include/dcmtk/dcmsr/dsrstpl.h \ + ../include/dcmtk/dcmsr/dsrdoctr.h ../include/dcmtk/dcmsr/dsrdocst.h \ + ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtypes.h \ + ../include/dcmtk/dcmsr/dsdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ + ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \ + ../include/dcmtk/dcmsr/dsrtnant.h \ + ../../ofstd/include/dcmtk/ofstd/ofstack.h \ + ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ + ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrnumvl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ + ../include/dcmtk/dcmsr/dsrscovl.h ../include/dcmtk/dcmsr/dsrscogr.h \ + ../include/dcmtk/dcmsr/dsrtlist.h ../include/dcmtk/dcmsr/dsrsc3vl.h \ + ../include/dcmtk/dcmsr/dsrsc3gr.h ../include/dcmtk/dcmsr/dsrtcovl.h \ + ../include/dcmtk/dcmsr/dsrtcodt.h ../include/dcmtk/dcmsr/dsrtcosp.h \ + ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \ + ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \ + ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \ + ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \ + ../include/dcmtk/dcmsr/cmr/define.h ../include/dcmtk/dcmsr/cmr/tid300.h \ + ../include/dcmtk/dcmsr/cmr/srnumvlu.h \ + ../include/dcmtk/dcmsr/cmr/srnumvl.h ../include/dcmtk/dcmsr/cmr/cid42.h \ + ../include/dcmtk/dcmsr/dsrctxgr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../include/dcmtk/dcmsr/cmr/cid244e.h ../include/dcmtk/dcmsr/cmr/cid244.h \ + ../include/dcmtk/dcmsr/cmr/cid6147.h \ ../include/dcmtk/dcmsr/cmr/cid7181.h \ ../include/dcmtk/dcmsr/cmr/cid7464.h \ - ../include/dcmtk/dcmsr/cmr/cid7469.h ../include/dcmtk/dcmsr/cmr/logger.h \ - ../include/dcmtk/dcmsr/codes/dcm.h ../include/dcmtk/dcmsr/codes/umls.h \ - ../include/dcmtk/dcmsr/dsrtpltn.h \ + ../include/dcmtk/dcmsr/cmr/cid7469.h \ + ../include/dcmtk/dcmsr/cmr/tid15def.h \ + ../include/dcmtk/dcmsr/cmr/logger.h ../include/dcmtk/dcmsr/codes/dcm.h \ + ../include/dcmtk/dcmsr/codes/ncit.h ../include/dcmtk/dcmsr/codes/srt.h \ + ../include/dcmtk/dcmsr/codes/umls.h ../include/dcmtk/dcmsr/dsrtpltn.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h +tid15def.o: tid15def.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/tid15def.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../include/dcmtk/dcmsr/cmr/define.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h tid1600.o: tid1600.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/cmr/tid1600.h ../include/dcmtk/dcmsr/dsrstpl.h \ ../include/dcmtk/dcmsr/dsrdoctr.h ../include/dcmtk/dcmsr/dsrdocst.h \ @@ -2263,7 +2499,11 @@ tid1600.o: tid1600.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -2294,3 +2534,102 @@ tid1600.o: tid1600.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/dsrdattn.h ../include/dcmtk/dcmsr/dsrstrvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h +tid300.o: tid300.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/tid300.h ../include/dcmtk/dcmsr/dsrstpl.h \ + ../include/dcmtk/dcmsr/dsrdoctr.h ../include/dcmtk/dcmsr/dsrdocst.h \ + ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtypes.h \ + ../include/dcmtk/dcmsr/dsdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ + ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \ + ../include/dcmtk/dcmsr/dsrtnant.h \ + ../../ofstd/include/dcmtk/ofstd/ofstack.h \ + ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ + ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrnumvl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ + ../include/dcmtk/dcmsr/dsrscovl.h ../include/dcmtk/dcmsr/dsrscogr.h \ + ../include/dcmtk/dcmsr/dsrtlist.h ../include/dcmtk/dcmsr/dsrsc3vl.h \ + ../include/dcmtk/dcmsr/dsrsc3gr.h ../include/dcmtk/dcmsr/dsrtcovl.h \ + ../include/dcmtk/dcmsr/dsrtcodt.h ../include/dcmtk/dcmsr/dsrtcosp.h \ + ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \ + ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \ + ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \ + ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \ + ../include/dcmtk/dcmsr/cmr/define.h \ + ../include/dcmtk/dcmsr/cmr/srnumvlu.h \ + ../include/dcmtk/dcmsr/cmr/srnumvl.h ../include/dcmtk/dcmsr/cmr/cid42.h \ + ../include/dcmtk/dcmsr/dsrctxgr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../include/dcmtk/dcmsr/cmr/cid244e.h ../include/dcmtk/dcmsr/cmr/cid244.h \ + ../include/dcmtk/dcmsr/cmr/tid15def.h \ + ../include/dcmtk/dcmsr/cmr/cid6147.h \ + ../include/dcmtk/dcmsr/cmr/cid7181.h \ + ../include/dcmtk/dcmsr/cmr/cid7464.h \ + ../include/dcmtk/dcmsr/cmr/cid7469.h ../include/dcmtk/dcmsr/cmr/logger.h \ + ../include/dcmtk/dcmsr/codes/dcm.h ../include/dcmtk/dcmsr/codes/srt.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h diff --git a/dcmsr/libcmr/Makefile.in b/dcmsr/libcmr/Makefile.in index f0ea9941..213c14d9 100644 --- a/dcmsr/libcmr/Makefile.in +++ b/dcmsr/libcmr/Makefile.in @@ -21,7 +21,8 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/incl -I$(dcmsr)/include LOCALDEFS = -objs = init.o logger.o srnumvl.o tid1001.o tid1204.o tid1411.o tid1500.o tid1600.o \ +objs = init.o logger.o srnumvl.o tid300.o tid1001.o tid1204.o tid1411.o tid1419m.o \ + tid1500.o tid1501.o tid15def.o tid1600.o \ cid11.o cid29.o cid29e.o cid42.o cid100.o cid244.o cid244e.o cid4020.o \ cid4021.o cid4031.o cid4031e.o cid5000.o cid5001.o cid6147.o cid7021.o \ cid7181.o cid7445.o cid7452.o cid7453.o cid7464.o cid7469.o cid10013.o \ diff --git a/dcmsr/libcmr/cid100.cc b/dcmsr/libcmr/cid100.cc index df1c08cc..bdd9345c 100644 --- a/dcmsr/libcmr/cid100.cc +++ b/dcmsr/libcmr/cid100.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID100_QuantitativeDiagnosticImagingProcedures * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:40 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:43 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid10013.cc b/dcmsr/libcmr/cid10013.cc index 0eb6bc87..60eee4a7 100644 --- a/dcmsr/libcmr/cid10013.cc +++ b/dcmsr/libcmr/cid10013.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID10013_CTAcquisitionType * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:59:04 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:18:05 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid10033.cc b/dcmsr/libcmr/cid10033.cc index dcfe31ae..56c5c959 100644 --- a/dcmsr/libcmr/cid10033.cc +++ b/dcmsr/libcmr/cid10033.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID10033_CTReconstructionAlgorithm * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:59:06 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:18:07 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid11.cc b/dcmsr/libcmr/cid11.cc index 0f96372a..66062d1f 100644 --- a/dcmsr/libcmr/cid11.cc +++ b/dcmsr/libcmr/cid11.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID11_RouteOfAdministration * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:35 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:38 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid244.cc b/dcmsr/libcmr/cid244.cc index 4a5750ba..151ef358 100644 --- a/dcmsr/libcmr/cid244.cc +++ b/dcmsr/libcmr/cid244.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID244_Laterality * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:42 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:44 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid29.cc b/dcmsr/libcmr/cid29.cc index 882f894b..2494ad48 100644 --- a/dcmsr/libcmr/cid29.cc +++ b/dcmsr/libcmr/cid29.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID29_AcquisitionModality * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:37 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:39 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid4020.cc b/dcmsr/libcmr/cid4020.cc index 8d36f850..da4338bd 100644 --- a/dcmsr/libcmr/cid4020.cc +++ b/dcmsr/libcmr/cid4020.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID4020_PETRadionuclide * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:44 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:46 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid4021.cc b/dcmsr/libcmr/cid4021.cc index e4350bbb..e3ac7e82 100644 --- a/dcmsr/libcmr/cid4021.cc +++ b/dcmsr/libcmr/cid4021.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID4021_PETRadiopharmaceutical * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:46 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:48 by J. Riesmeier * */ @@ -18,7 +18,7 @@ // general information on CID 4021 (PET Radiopharmaceutical) #define CONTEXT_GROUP_NUMBER "4021" -#define CONTEXT_GROUP_VERSION "20160119" +#define CONTEXT_GROUP_VERSION "20170413" #define CONTEXT_GROUP_UID "1.2.840.10008.6.1.305" #define CONTEXT_GROUP_TYPE OFTrue /* extensible */ @@ -190,10 +190,9 @@ CID4021_PETRadiopharmaceutical::CodeList &CID4021_PETRadiopharmaceutical::getCod Codes->insert(OFMake_pair(Fallypride_C11, DSRBasicCodedEntry("126704", "DCM", "Fallypride C^11^"))); Codes->insert(OFMake_pair(Fallypride_F18, DSRBasicCodedEntry("126705", "DCM", "Fallypride F^18^"))); Codes->insert(OFMake_pair(FLB457_C11, DSRBasicCodedEntry("126706", "DCM", "FLB 457 C^11^"))); - Codes->insert(OFMake_pair(Florbetaben_F18, DSRBasicCodedEntry("126501", "DCM", "Florbetaben F^18^"))); + Codes->insert(OFMake_pair(Florbetaben_F18, DSRBasicCodedEntry("C-D6858", "SRT", "Florbetaben F^18^"))); Codes->insert(OFMake_pair(Florbetapir_F18, DSRBasicCodedEntry("C-E0269", "SRT", "Florbetapir F^18^"))); - Codes->insert(OFMake_pair(Flubatine_F18_126503, DSRBasicCodedEntry("126503", "DCM", "Flubatine F^18^"))); - Codes->insert(OFMake_pair(Flubatine_F18_126712, DSRBasicCodedEntry("126712", "DCM", "Flubatine F^18^"))); + Codes->insert(OFMake_pair(Flubatine_F18, DSRBasicCodedEntry("126503", "DCM", "Flubatine F^18^"))); Codes->insert(OFMake_pair(Fluciclatide_F18, DSRBasicCodedEntry("C-E0265", "SRT", "Fluciclatide F^18^"))); Codes->insert(OFMake_pair(Fluciclovine_F18, DSRBasicCodedEntry("C-E026A", "SRT", "Fluciclovine F^18^"))); Codes->insert(OFMake_pair(Flumazenil_C11, DSRBasicCodedEntry("C-B07DE", "SRT", "Flumazenil C^11^"))); @@ -210,6 +209,7 @@ CID4021_PETRadiopharmaceutical::CodeList &CID4021_PETRadiopharmaceutical::getCod Codes->insert(OFMake_pair(FluoropropylDihydrotetrabenazineDTBZ_F18, DSRBasicCodedEntry("C2934038", "UMLS", "Fluoropropyl-dihydrotetrabenazine (DTBZ) F^18^"))); Codes->insert(OFMake_pair(Fluorotriopride_F18, DSRBasicCodedEntry("126707", "DCM", "Fluorotriopride F^18^"))); Codes->insert(OFMake_pair(Fluorouracil_F18, DSRBasicCodedEntry("C-B07E3", "SRT", "Fluorouracil F^18^"))); + Codes->insert(OFMake_pair(Flurpiridaz_F18, DSRBasicCodedEntry("126718", "DCM", "Flurpiridaz F^18^"))); Codes->insert(OFMake_pair(Flutemetamol_F18, DSRBasicCodedEntry("C-E0267", "SRT", "Flutemetamol F^18^"))); Codes->insert(OFMake_pair(Fresolimumab_89Zr, DSRBasicCodedEntry("126748", "DCM", "Fresolimumab ^89^Zr"))); Codes->insert(OFMake_pair(GA201_89Zr, DSRBasicCodedEntry("126731", "DCM", "GA201 ^89^Zr"))); @@ -256,6 +256,7 @@ CID4021_PETRadiopharmaceutical::CodeList &CID4021_PETRadiopharmaceutical::getCod Codes->insert(OFMake_pair(Sodium_Na22, DSRBasicCodedEntry("C-B1047", "SRT", "Sodium Na^22^"))); Codes->insert(OFMake_pair(Spiperone_F18, DSRBasicCodedEntry("C-B1033", "SRT", "Spiperone F^18^"))); Codes->insert(OFMake_pair(T807_F18, DSRBasicCodedEntry("126502", "DCM", "T807 F^18^"))); + Codes->insert(OFMake_pair(THK5351_F18, DSRBasicCodedEntry("126717", "DCM", "THK5351 F^18^"))); Codes->insert(OFMake_pair(ThymidineFLT_F18, DSRBasicCodedEntry("C-B1036", "SRT", "Thymidine (FLT) F^18^"))); Codes->insert(OFMake_pair(Trastuzumab_89Zr, DSRBasicCodedEntry("126512", "DCM", "Trastuzumab ^89^Zr"))); Codes->insert(OFMake_pair(TRC105_89Zr, DSRBasicCodedEntry("126749", "DCM", "TRC105 ^89^Zr"))); diff --git a/dcmsr/libcmr/cid4031.cc b/dcmsr/libcmr/cid4031.cc index 9fe12c09..7394c826 100644 --- a/dcmsr/libcmr/cid4031.cc +++ b/dcmsr/libcmr/cid4031.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID4031_CommonAnatomicRegions * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:47 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017d + * File created on 2017-09-26 12:18:52 by J. Riesmeier * */ @@ -18,7 +18,7 @@ // general information on CID 4031 (Common Anatomic Regions) #define CONTEXT_GROUP_NUMBER "4031" -#define CONTEXT_GROUP_VERSION "20160314" +#define CONTEXT_GROUP_VERSION "20170914" #define CONTEXT_GROUP_UID "1.2.840.10008.6.1.308" #define CONTEXT_GROUP_TYPE OFTrue /* extensible */ @@ -223,7 +223,7 @@ CID4031_CommonAnatomicRegions::CodeList &CID4031_CommonAnatomicRegions::getCodes Codes->insert(OFMake_pair(Pelvis, DSRBasicCodedEntry("T-D6000", "SRT", "Pelvis"))); Codes->insert(OFMake_pair(PelvisAndLowerExtremities, DSRBasicCodedEntry("R-FAB58", "SRT", "Pelvis and lower extremities"))); Codes->insert(OFMake_pair(Phantom, DSRBasicCodedEntry("113681", "DCM", "Phantom"))); - Codes->insert(OFMake_pair(Prostate, DSRBasicCodedEntry("T-9200B", "SRT", "Prostate"))); + Codes->insert(OFMake_pair(Prostate, DSRBasicCodedEntry("T-92000", "SRT", "Prostate"))); Codes->insert(OFMake_pair(Rectum, DSRBasicCodedEntry("T-59600", "SRT", "Rectum"))); Codes->insert(OFMake_pair(Rib, DSRBasicCodedEntry("T-11300", "SRT", "Rib"))); Codes->insert(OFMake_pair(SacroiliacJoint, DSRBasicCodedEntry("T-15680", "SRT", "Sacroiliac joint"))); diff --git a/dcmsr/libcmr/cid4031e.cc b/dcmsr/libcmr/cid4031e.cc index b0ef8427..ca20c23a 100644 --- a/dcmsr/libcmr/cid4031e.cc +++ b/dcmsr/libcmr/cid4031e.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2018, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID4031e_CommonAnatomicRegions @@ -30,13 +30,15 @@ struct DefinedTermTypeMapStruct * constant definitions * *------------------------*/ -// mapping extracted from DICOM PS 3.16 Table L-1 +// mapping extracted from DICOM PS 3.16-2017e Table L-1 static const DefinedTermTypeMapStruct DefinedTermTypeMap[] = { {"ABDOMEN", CID4031_CommonAnatomicRegions::Abdomen}, {"ABDOMENPELVIS", CID4031_CommonAnatomicRegions::AbdomenAndPelvis}, + {"ACJOINT", CID4031_CommonAnatomicRegions::AcromioclavicularJoint}, {"ANKLE", CID4031_CommonAnatomicRegions::AnkleJoint}, + {"BILEDUCT", CID4031_CommonAnatomicRegions::BileDuct}, {"BLADDER", CID4031_CommonAnatomicRegions::Bladder}, {"BREAST", CID4031_CommonAnatomicRegions::Breast}, {"BRONCHUS", CID4031_CommonAnatomicRegions::Bronchus}, @@ -58,6 +60,7 @@ static const DefinedTermTypeMapStruct DefinedTermTypeMap[] = {"FEMUR", CID4031_CommonAnatomicRegions::Femur}, {"FINGER", CID4031_CommonAnatomicRegions::Finger}, {"FOOT", CID4031_CommonAnatomicRegions::Foot}, + {"FOREARM", CID4031_CommonAnatomicRegions::Forearm}, {"GALLBLADDER", CID4031_CommonAnatomicRegions::Gallbladder}, {"HAND", CID4031_CommonAnatomicRegions::Hand}, {"HEAD", CID4031_CommonAnatomicRegions::Head}, @@ -71,16 +74,20 @@ static const DefinedTermTypeMapStruct DefinedTermTypeMap[] = {"JAW", CID4031_CommonAnatomicRegions::JawRegion}, {"JEJUNUM", CID4031_CommonAnatomicRegions::Jejunum}, {"KNEE", CID4031_CommonAnatomicRegions::Knee}, + {"LARGEINTESTINE", CID4031_CommonAnatomicRegions::LargeIntestine}, {"LARYNX", CID4031_CommonAnatomicRegions::Larynx}, {"LEG", CID4031_CommonAnatomicRegions::LowerLeg}, {"LSPINE", CID4031_CommonAnatomicRegions::LumbarSpine}, {"LSSPINE", CID4031_CommonAnatomicRegions::LumboSacralSpine}, + {"JAW", CID4031_CommonAnatomicRegions::Mandible}, // same Defined Term as for (T-D1213,SRT,"Jaw region") + {"MASTOID", CID4031_CommonAnatomicRegions::MastoidBone}, {"MAXILLA", CID4031_CommonAnatomicRegions::Maxilla}, {"MEDIASTINUM", CID4031_CommonAnatomicRegions::Mediastinum}, {"NECK", CID4031_CommonAnatomicRegions::Neck}, {"NECKCHEST", CID4031_CommonAnatomicRegions::NeckAndChest}, {"NECKCHESTABDOMEN", CID4031_CommonAnatomicRegions::NeckChestAndAbdomen}, {"NECKCHESTABDPELV", CID4031_CommonAnatomicRegions::NeckChestAbdomenAndPelvis}, + {"OPTICCANAL", CID4031_CommonAnatomicRegions::OpticCanal}, {"ORBIT", CID4031_CommonAnatomicRegions::OrbitalStructure}, {"PAROTID", CID4031_CommonAnatomicRegions::ParotidGland}, {"PATELLA", CID4031_CommonAnatomicRegions::Patella}, @@ -88,11 +95,16 @@ static const DefinedTermTypeMapStruct DefinedTermTypeMap[] = {"PROSTATE", CID4031_CommonAnatomicRegions::Prostate}, {"RECTUM", CID4031_CommonAnatomicRegions::Rectum}, {"RIB", CID4031_CommonAnatomicRegions::Rib}, + {"SIJOINT", CID4031_CommonAnatomicRegions::SacroiliacJoint}, {"SSPINE", CID4031_CommonAnatomicRegions::Sacrum}, {"SCAPULA", CID4031_CommonAnatomicRegions::Scapula}, + {"SELLA", CID4031_CommonAnatomicRegions::SellaTurcica}, + {"SESAMOID", CID4031_CommonAnatomicRegions::SesamoidBonesOfFoot}, {"SHOULDER", CID4031_CommonAnatomicRegions::Shoulder}, {"SKULL", CID4031_CommonAnatomicRegions::Skull}, + {"SMALLINTESTINE", CID4031_CommonAnatomicRegions::SmallIntestine}, {"SPINE", CID4031_CommonAnatomicRegions::Spine}, + {"SCJOINT", CID4031_CommonAnatomicRegions::SternoclavicularJoint}, {"STERNUM", CID4031_CommonAnatomicRegions::Sternum}, {"STOMACH", CID4031_CommonAnatomicRegions::Stomach}, {"SUBMANDIBULAR", CID4031_CommonAnatomicRegions::SubmandibularGland}, @@ -104,6 +116,7 @@ static const DefinedTermTypeMapStruct DefinedTermTypeMap[] = {"TOE", CID4031_CommonAnatomicRegions::Toe}, {"TRACHEA", CID4031_CommonAnatomicRegions::Trachea}, {"ARM", CID4031_CommonAnatomicRegions::UpperArm}, + {"UPRURINARYTRACT", CID4031_CommonAnatomicRegions::UpperUrinaryTract}, {"URETER", CID4031_CommonAnatomicRegions::Ureter}, {"URETHRA", CID4031_CommonAnatomicRegions::Urethra}, {"WRIST", CID4031_CommonAnatomicRegions::WristJoint}, @@ -131,7 +144,7 @@ CID4031e_CommonAnatomicRegions::CID4031e_CommonAnatomicRegions(const EnumType se CID4031e_CommonAnatomicRegions::CID4031e_CommonAnatomicRegions(const OFString &selectedValue, - const OFBool enhancedEncodingMode) + const OFBool enhancedEncodingMode) : CID4031_CommonAnatomicRegions(mapBodyPartExamined(selectedValue, enhancedEncodingMode)) { } @@ -173,6 +186,7 @@ OFCondition CID4031e_CommonAnatomicRegions::mapBodyPartExamined(const OFString & /* determine region code from CID 4031 (based on the mapping in PS 3.16 Annex L) */ for (size_t i = 0; i < NumberOfDefinedTerms; ++i) { + /* use first match */ if (definedTerm == DefinedTermTypeMap[i].DefinedTerm) { codedEntryValue = getCodedEntry(DefinedTermTypeMap[i].Type); diff --git a/dcmsr/libcmr/cid42.cc b/dcmsr/libcmr/cid42.cc index b1c21151..3437d8d2 100644 --- a/dcmsr/libcmr/cid42.cc +++ b/dcmsr/libcmr/cid42.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID42_NumericValueQualifier * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:39 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:41 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid6147.cc b/dcmsr/libcmr/cid6147.cc index 4b6bee93..2fb2b12b 100644 --- a/dcmsr/libcmr/cid6147.cc +++ b/dcmsr/libcmr/cid6147.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID6147_ResponseCriteria * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:49 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:51 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid7021.cc b/dcmsr/libcmr/cid7021.cc index 607327c1..99f2d8ec 100644 --- a/dcmsr/libcmr/cid7021.cc +++ b/dcmsr/libcmr/cid7021.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7021_MeasurementReportDocumentTitles * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:52 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:53 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid7181.cc b/dcmsr/libcmr/cid7181.cc index 7378ee42..cf3898fb 100644 --- a/dcmsr/libcmr/cid7181.cc +++ b/dcmsr/libcmr/cid7181.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7181_AbstractMultiDimensionalImageModelComponentUnits * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:54 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017d + * File created on 2017-09-26 12:18:58 by J. Riesmeier * */ @@ -18,7 +18,7 @@ // general information on CID 7181 (Abstract Multi-dimensional Image Model Component Units) #define CONTEXT_GROUP_NUMBER "7181" -#define CONTEXT_GROUP_VERSION "20161106" +#define CONTEXT_GROUP_VERSION "20170413" #define CONTEXT_GROUP_UID "1.2.840.10008.6.1.918" #define CONTEXT_GROUP_TYPE OFTrue /* extensible */ @@ -177,6 +177,7 @@ CID7181_AbstractMultiDimensionalImageModelComponentUnits::CodeList &CID7181_Abst Codes->insert(OFMake_pair(CountsPerSecond, DSRBasicCodedEntry("{counts}/s", "UCUM", "Counts per second"))); Codes->insert(OFMake_pair(ProportionalToCounts, DSRBasicCodedEntry("{propcounts}", "UCUM", "Proportional to counts"))); Codes->insert(OFMake_pair(ProportionalToCountsPerSecond, DSRBasicCodedEntry("{propcounts}/s", "UCUM", "Proportional to counts per second"))); + Codes->insert(OFMake_pair(SquareCentimeterPerMilliliter, DSRBasicCodedEntry("cm2/ml", "UCUM", "Centimeter**2/milliliter"))); Codes->insert(OFMake_pair(Percent, DSRBasicCodedEntry("%", "UCUM", "Percent"))); Codes->insert(OFMake_pair(BecquerelsPerMilliliter, DSRBasicCodedEntry("Bq/ml", "UCUM", "Becquerels/milliliter"))); Codes->insert(OFMake_pair(MilligramsPerMinutePerMilliliter, DSRBasicCodedEntry("mg/min/ml", "UCUM", "Milligrams/minute/milliliter"))); @@ -185,6 +186,10 @@ CID7181_AbstractMultiDimensionalImageModelComponentUnits::CodeList &CID7181_Abst Codes->insert(OFMake_pair(MilliliterPerGram, DSRBasicCodedEntry("ml/g", "UCUM", "Milliliter/gram"))); Codes->insert(OFMake_pair(PerCentimeter, DSRBasicCodedEntry("/cm", "UCUM", "/Centimeter"))); Codes->insert(OFMake_pair(MicromolePerMilliliter, DSRBasicCodedEntry("umol/ml", "UCUM", "Micromole/milliliter"))); + Codes->insert(OFMake_pair(Mm2PerS, DSRBasicCodedEntry("mm2/s", "UCUM", "mm2/s"))); + Codes->insert(OFMake_pair(Um2PerMs, DSRBasicCodedEntry("um2/ms", "UCUM", "um2/ms"))); + Codes->insert(OFMake_pair(Um2PerS, DSRBasicCodedEntry("um2/s", "UCUM", "um2/s"))); + Codes->insert(OFMake_pair(_106mm2PerS, DSRBasicCodedEntry("10-6.mm2/s", "UCUM", "10-6.mm2/s"))); Codes->insert(OFMake_pair(NoUnits, DSRBasicCodedEntry("1", "UCUM", "no units"))); Codes->insert(OFMake_pair(Ratio, DSRBasicCodedEntry("{ratio}", "UCUM", "ratio"))); Codes->insert(OFMake_pair(HounsfieldUnit, DSRBasicCodedEntry("[hnsf'U]", "UCUM", "Hounsfield Unit"))); @@ -201,7 +206,6 @@ CID7181_AbstractMultiDimensionalImageModelComponentUnits::CodeList &CID7181_Abst Codes->insert(OFMake_pair(Hertz, DSRBasicCodedEntry("Hz", "UCUM", "Hertz"))); Codes->insert(OFMake_pair(MilliTesla, DSRBasicCodedEntry("mT", "UCUM", "milliTesla"))); Codes->insert(OFMake_pair(NumberParticlesPer100GramOfTissue, DSRBasicCodedEntry("{Particles}/[100]g{Tissue}", "UCUM", "number particles per 100 gram of tissue"))); - Codes->insert(OFMake_pair(SquareMillimeterPerSecond, DSRBasicCodedEntry("mm2/s", "UCUM", "square millimeter per second"))); Codes->insert(OFMake_pair(SecondPerSquareMillimeter, DSRBasicCodedEntry("s/mm2", "UCUM", "second per square millimeter"))); Codes->insert(OFMake_pair(MilliliterPer100GramPerMinute, DSRBasicCodedEntry("ml/[100]g/min", "UCUM", "milliliter per 100 gram per minute"))); Codes->insert(OFMake_pair(MilliliterPer100Milliliter, DSRBasicCodedEntry("ml/[100]ml", "UCUM", "milliliter per 100 milliliter"))); diff --git a/dcmsr/libcmr/cid7445.cc b/dcmsr/libcmr/cid7445.cc index 7d8ec9a1..a116baf2 100644 --- a/dcmsr/libcmr/cid7445.cc +++ b/dcmsr/libcmr/cid7445.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7445_DeviceParticipatingRoles * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:55 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:57 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid7452.cc b/dcmsr/libcmr/cid7452.cc index e6ee43f6..d9a1bb10 100644 --- a/dcmsr/libcmr/cid7452.cc +++ b/dcmsr/libcmr/cid7452.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7452_OrganizationalRoles * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:57 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:17:58 by J. Riesmeier * */ @@ -18,7 +18,7 @@ // general information on CID 7452 (Organizational Roles) #define CONTEXT_GROUP_NUMBER "7452" -#define CONTEXT_GROUP_VERSION "20150602" +#define CONTEXT_GROUP_VERSION "20170626" #define CONTEXT_GROUP_UID "1.2.840.10008.6.1.516" #define CONTEXT_GROUP_TYPE OFTrue /* extensible */ @@ -151,8 +151,16 @@ CID7452_OrganizationalRoles::CodeList &CID7452_OrganizationalRoles::getCodes() /* and initialize it by adding the coded entries */ Codes->insert(OFMake_pair(MedicalPractitioner, DSRBasicCodedEntry("J-0016E", "SRT", "Medical Practitioner"))); Codes->insert(OFMake_pair(Physician, DSRBasicCodedEntry("J-004E8", "SRT", "Physician"))); + Codes->insert(OFMake_pair(HeadOfRadiology, DSRBasicCodedEntry("128670", "DCM", "Head of Radiology"))); + Codes->insert(OFMake_pair(ChairOfProtocolCommittee, DSRBasicCodedEntry("128671", "DCM", "Chair of Protocol Committee"))); + Codes->insert(OFMake_pair(RepresentativeOfProtocolCommittee, DSRBasicCodedEntry("128676", "DCM", "Representative of Protocol Committee"))); + Codes->insert(OFMake_pair(RepresentativeOfEthicsCommittee, DSRBasicCodedEntry("128677", "DCM", "Representative of Ethics Committee"))); + Codes->insert(OFMake_pair(HeadOfCardiology, DSRBasicCodedEntry("128675", "DCM", "Head of Cardiology"))); + Codes->insert(OFMake_pair(AdministratorOfRadiologyDepartment, DSRBasicCodedEntry("128673", "DCM", "Administrator of Radiology Department"))); Codes->insert(OFMake_pair(Nurse, DSRBasicCodedEntry("J-07100", "SRT", "Nurse"))); Codes->insert(OFMake_pair(RadiologicTechnologist, DSRBasicCodedEntry("J-00187", "SRT", "Radiologic Technologist"))); + Codes->insert(OFMake_pair(LeadRadiologicTechnologist, DSRBasicCodedEntry("128674", "DCM", "Lead Radiologic Technologist"))); + Codes->insert(OFMake_pair(RadiationTherapist, DSRBasicCodedEntry("J-06173", "SRT", "Radiation Therapist"))); Codes->insert(OFMake_pair(Radiographer, DSRBasicCodedEntry("J-00187", "SRT", "Radiographer"))); Codes->insert(OFMake_pair(Intern, DSRBasicCodedEntry("C1144859", "UMLS", "Intern"))); Codes->insert(OFMake_pair(Resident, DSRBasicCodedEntry("J-005E6", "SRT", "Resident"))); diff --git a/dcmsr/libcmr/cid7453.cc b/dcmsr/libcmr/cid7453.cc index dd1e7b47..c5360022 100644 --- a/dcmsr/libcmr/cid7453.cc +++ b/dcmsr/libcmr/cid7453.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7453_PerformingRoles * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:58:59 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:18:00 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid7464.cc b/dcmsr/libcmr/cid7464.cc index 47067f96..8f944960 100644 --- a/dcmsr/libcmr/cid7464.cc +++ b/dcmsr/libcmr/cid7464.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7464_GeneralRegionOfInterestMeasurementModifiers * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:59:01 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017c + * File created on 2017-07-17 14:18:02 by J. Riesmeier * */ diff --git a/dcmsr/libcmr/cid7469.cc b/dcmsr/libcmr/cid7469.cc index 976f1229..20c8234a 100644 --- a/dcmsr/libcmr/cid7469.cc +++ b/dcmsr/libcmr/cid7469.cc @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7469_GenericIntensityAndSizeMeasurements * - * Generated automatically from DICOM PS 3.16-2016e - * File created on 2016-11-23 13:59:03 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2017d + * File created on 2017-09-26 12:19:07 by J. Riesmeier * */ @@ -179,16 +179,28 @@ CID7469_GenericIntensityAndSizeMeasurements::CodeList &CID7469_GenericIntensityA Codes->insert(OFMake_pair(T2WeightedMRSignalIntensity, DSRBasicCodedEntry("110805", "DCM", "T2 Weighted MR Signal Intensity"))); Codes->insert(OFMake_pair(T2StarWeightedMRSignalIntensity, DSRBasicCodedEntry("110806", "DCM", "T2* Weighted MR Signal Intensity"))); Codes->insert(OFMake_pair(DiffusionWeighted, DSRBasicCodedEntry("113043", "DCM", "Diffusion weighted"))); - Codes->insert(OFMake_pair(FieldMapMRSignalIntensity, DSRBasicCodedEntry("110807", "DCM", "Field Map MR Signal Intensity"))); - Codes->insert(OFMake_pair(FractionalAnisotropy, DSRBasicCodedEntry("110808", "DCM", "Fractional Anisotropy"))); - Codes->insert(OFMake_pair(RelativeAnisotropy, DSRBasicCodedEntry("110809", "DCM", "Relative Anisotropy"))); - Codes->insert(OFMake_pair(ApparentDiffusionCoefficient, DSRBasicCodedEntry("113041", "DCM", "Apparent Diffusion Coefficient"))); Codes->insert(OFMake_pair(VolumetricDiffusionDxxComponent, DSRBasicCodedEntry("110810", "DCM", "Volumetric Diffusion Dxx Component"))); Codes->insert(OFMake_pair(VolumetricDiffusionDxyComponent, DSRBasicCodedEntry("110811", "DCM", "Volumetric Diffusion Dxy Component"))); Codes->insert(OFMake_pair(VolumetricDiffusionDxzComponent, DSRBasicCodedEntry("110812", "DCM", "Volumetric Diffusion Dxz Component"))); Codes->insert(OFMake_pair(VolumetricDiffusionDyyComponent, DSRBasicCodedEntry("110813", "DCM", "Volumetric Diffusion Dyy Component"))); Codes->insert(OFMake_pair(VolumetricDiffusionDyzComponent, DSRBasicCodedEntry("110814", "DCM", "Volumetric Diffusion Dyz Component"))); Codes->insert(OFMake_pair(VolumetricDiffusionDzzComponent, DSRBasicCodedEntry("110815", "DCM", "Volumetric Diffusion Dzz Component"))); + Codes->insert(OFMake_pair(FractionalAnisotropy, DSRBasicCodedEntry("110808", "DCM", "Fractional Anisotropy"))); + Codes->insert(OFMake_pair(RelativeAnisotropy, DSRBasicCodedEntry("110809", "DCM", "Relative Anisotropy"))); + Codes->insert(OFMake_pair(VolumeRatio, DSRBasicCodedEntry("113288", "DCM", "Volume Ratio"))); + Codes->insert(OFMake_pair(ApparentDiffusionCoefficient, DSRBasicCodedEntry("113041", "DCM", "Apparent Diffusion Coefficient"))); + Codes->insert(OFMake_pair(DiffusionCoefficient, DSRBasicCodedEntry("113289", "DCM", "Diffusion Coefficient"))); + Codes->insert(OFMake_pair(MonoExponentialApparentDiffusionCoefficient, DSRBasicCodedEntry("113290", "DCM", "Mono-exponential Apparent Diffusion Coefficient"))); + Codes->insert(OFMake_pair(SlowDiffusionCoefficient, DSRBasicCodedEntry("113291", "DCM", "Slow Diffusion Coefficient"))); + Codes->insert(OFMake_pair(FastDiffusionCoefficient, DSRBasicCodedEntry("113292", "DCM", "Fast Diffusion Coefficient"))); + Codes->insert(OFMake_pair(FastDiffusionCoefficientFraction, DSRBasicCodedEntry("113293", "DCM", "Fast Diffusion Coefficient Fraction"))); + Codes->insert(OFMake_pair(KurtosisDiffusionCoefficient, DSRBasicCodedEntry("113294", "DCM", "Kurtosis Diffusion Coefficient"))); + Codes->insert(OFMake_pair(GammaDistributionScaleParameter, DSRBasicCodedEntry("113295", "DCM", "Gamma Distribution Scale Parameter"))); + Codes->insert(OFMake_pair(GammaDistributionShapeParameter, DSRBasicCodedEntry("113296", "DCM", "Gamma Distribution Shape Parameter"))); + Codes->insert(OFMake_pair(GammaDistributionMode, DSRBasicCodedEntry("113297", "DCM", "Gamma Distribution Mode"))); + Codes->insert(OFMake_pair(DistributedDiffusionCoefficient, DSRBasicCodedEntry("113298", "DCM", "Distributed Diffusion Coefficient"))); + Codes->insert(OFMake_pair(AnomalousExponentParameter, DSRBasicCodedEntry("113299", "DCM", "Anomalous Exponent Parameter"))); + Codes->insert(OFMake_pair(FieldMapMRSignalIntensity, DSRBasicCodedEntry("110807", "DCM", "Field Map MR Signal Intensity"))); Codes->insert(OFMake_pair(T1WeightedDynamicContrastEnhancedMRSignalIntensity, DSRBasicCodedEntry("110816", "DCM", "T1 Weighted Dynamic Contrast Enhanced MR Signal Intensity"))); Codes->insert(OFMake_pair(T2WeightedDynamicContrastEnhancedMRSignalIntensity, DSRBasicCodedEntry("110817", "DCM", "T2 Weighted Dynamic Contrast Enhanced MR Signal Intensity"))); Codes->insert(OFMake_pair(T2StarWeightedDynamicContrastEnhancedMRSignalIntensity, DSRBasicCodedEntry("110818", "DCM", "T2* Weighted Dynamic Contrast Enhanced MR Signal Intensity"))); @@ -213,6 +225,10 @@ CID7469_GenericIntensityAndSizeMeasurements::CodeList &CID7469_GenericIntensityA Codes->insert(OFMake_pair(ZScore, DSRBasicCodedEntry("113071", "DCM", "Z-score"))); Codes->insert(OFMake_pair(RCoefficient, DSRBasicCodedEntry("113057", "DCM", "R-Coefficient"))); Codes->insert(OFMake_pair(R2Coefficient, DSRBasicCodedEntry("126220", "DCM", "R2-Coefficient"))); + Codes->insert(OFMake_pair(ChiSquare, DSRBasicCodedEntry("126221", "DCM", "Chi-square"))); + Codes->insert(OFMake_pair(DW, DSRBasicCodedEntry("126222", "DCM", "D-W"))); + Codes->insert(OFMake_pair(AIC, DSRBasicCodedEntry("126223", "DCM", "AIC"))); + Codes->insert(OFMake_pair(BIC, DSRBasicCodedEntry("126224", "DCM", "BIC"))); Codes->insert(OFMake_pair(RGBRComponent, DSRBasicCodedEntry("110834", "DCM", "RGB R Component"))); Codes->insert(OFMake_pair(RGBGComponent, DSRBasicCodedEntry("110835", "DCM", "RGB G Component"))); Codes->insert(OFMake_pair(RGBBComponent, DSRBasicCodedEntry("110836", "DCM", "RGB B Component"))); @@ -274,6 +290,8 @@ CID7469_GenericIntensityAndSizeMeasurements::CodeList &CID7469_GenericIntensityA Codes->insert(OFMake_pair(SUVlbmJanma, DSRBasicCodedEntry("126405", "DCM", "SUVlbm(Janma)"))); Codes->insert(OFMake_pair(SUVbsa, DSRBasicCodedEntry("126403", "DCM", "SUVbsa"))); Codes->insert(OFMake_pair(SUVibw, DSRBasicCodedEntry("126404", "DCM", "SUVibw"))); + Codes->insert(OFMake_pair(AbsorbedDose, DSRBasicCodedEntry("128513", "DCM", "Absorbed Dose"))); + Codes->insert(OFMake_pair(EquivalentDose, DSRBasicCodedEntry("128512", "DCM", "Equivalent Dose"))); Codes->insert(OFMake_pair(Length, DSRBasicCodedEntry("G-D7FE", "SRT", "Length"))); Codes->insert(OFMake_pair(PathLength, DSRBasicCodedEntry("121211", "DCM", "Path length"))); Codes->insert(OFMake_pair(Distance, DSRBasicCodedEntry("121206", "DCM", "Distance"))); diff --git a/dcmsr/libcmr/tid1001.cc b/dcmsr/libcmr/tid1001.cc index 25c928b5..2c460466 100644 --- a/dcmsr/libcmr/tid1001.cc +++ b/dcmsr/libcmr/tid1001.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class TID1001_ObservationContext @@ -25,22 +25,25 @@ #define BAD_RESULT(call) if (result.bad()) call // index positions in node list (makes source code more readable) -#define LAST_PERSON_OBSERVER 0 -#define LAST_DEVICE_OBSERVER 1 +#define LAST_PERSON_OBSERVER 0 +#define LAST_DEVICE_OBSERVER 1 +#define NUMBER_OF_LIST_ENTRIES 2 // general information on TID 1001 (Observation Context) #define TEMPLATE_NUMBER "1001" #define MAPPING_RESOURCE "DCMR" #define MAPPING_RESOURCE_UID UID_DICOMContentMappingResource #define TEMPLATE_TYPE OFFalse /* non-extensible, but included templates are */ +#define TEMPLATE_ORDER OFTrue /* significant */ TID1001_ObservationContext::TID1001_ObservationContext() : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID) { setExtensible(TEMPLATE_TYPE); - /* need to store last person and device observer */ - reserveEntriesInNodeList(2); + setOrderSignificant(TEMPLATE_ORDER); + /* need to store position of various content items */ + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES); } diff --git a/dcmsr/libcmr/tid1204.cc b/dcmsr/libcmr/tid1204.cc index 60b54212..9b3736ca 100644 --- a/dcmsr/libcmr/tid1204.cc +++ b/dcmsr/libcmr/tid1204.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class TID1204_LanguageOfContentItemAndDescendants @@ -29,12 +29,14 @@ #define MAPPING_RESOURCE "DCMR" #define MAPPING_RESOURCE_UID UID_DICOMContentMappingResource #define TEMPLATE_TYPE OFFalse /* non-extensible */ +#define TEMPLATE_ORDER OFTrue /* significant */ TID1204_LanguageOfContentItemAndDescendants::TID1204_LanguageOfContentItemAndDescendants() : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID) { setExtensible(TEMPLATE_TYPE); + setOrderSignificant(TEMPLATE_ORDER); } diff --git a/dcmsr/libcmr/tid1411.cc b/dcmsr/libcmr/tid1411.cc index 8975497d..3023e8f3 100644 --- a/dcmsr/libcmr/tid1411.cc +++ b/dcmsr/libcmr/tid1411.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class TID1411_VolumetricROIMeasurements @@ -13,15 +13,13 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmsr/cmr/tid1411.h" -#include "dcmtk/dcmsr/cmr/cid6147.h" -#include "dcmtk/dcmsr/cmr/cid7181.h" -#include "dcmtk/dcmsr/cmr/cid7464.h" -#include "dcmtk/dcmsr/cmr/cid7469.h" +#include "dcmtk/dcmsr/cmr/tid15def.h" #include "dcmtk/dcmsr/cmr/logger.h" #include "dcmtk/dcmsr/codes/dcm.h" #include "dcmtk/dcmsr/codes/ncit.h" #include "dcmtk/dcmsr/codes/srt.h" #include "dcmtk/dcmsr/codes/umls.h" +#include "dcmtk/dcmsr/dsrtpltn.h" #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcuid.h" @@ -44,41 +42,49 @@ #define SOURCE_SERIES_FOR_SEGMENTATION 7 #define REAL_WORLD_VALUE_MAP 8 #define MEASUREMENT_METHOD 9 -#define FINDING_SITE 10 +#define LAST_FINDING_SITE 10 #define LAST_MEASUREMENT 11 +#define LAST_QUALITATIVE_EVALUATION 12 +#define NUMBER_OF_LIST_ENTRIES 13 // general information on TID 1411 (Volumetric ROI Measurements) #define TEMPLATE_NUMBER "1411" #define MAPPING_RESOURCE "DCMR" #define MAPPING_RESOURCE_UID UID_DICOMContentMappingResource -#define TEMPLATE_TYPE OFTrue /* extensible */ - -// conditions constants -makeOFConditionConst(CMR_EC_NoMeasurementGroup, OFM_dcmsr, 1411, OF_error, "No Measurement Group"); -makeOFConditionConst(CMR_EC_InvalidSegmentationObject, OFM_dcmsr, 1412, OF_error, "Invalid Segmentation Object"); -makeOFConditionConst(CMR_EC_InvalidRealWorldValueMappingObject, OFM_dcmsr, 1413, OF_error, "Invalid Real World Value Mapping Object"); +#define TEMPLATE_TYPE OFTrue /* extensible */ +#define TEMPLATE_ORDER OFFalse /* non-significant */ template TID1411_VolumetricROIMeasurements::TID1411_VolumetricROIMeasurements(const OFBool createGroup) - : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID) + : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID), + Measurement(new TID1419_Measurement()) { setExtensible(TEMPLATE_TYPE); + setOrderSignificant(TEMPLATE_ORDER); /* need to store position of various content items */ - reserveEntriesInNodeList(12, OFTrue /*initialize*/); + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES, OFTrue /*initialize*/); /* TID 1411 (Volumetric ROI Measurements) Row 1 */ if (createGroup) createMeasurementGroup(); } +template +void TID1411_VolumetricROIMeasurements::clear() +{ + DSRSubTemplate::clear(); + Measurement->clear(); +} + + template OFBool TID1411_VolumetricROIMeasurements::isValid() const { /* check whether base class is valid and all required content items are present */ return DSRSubTemplate::isValid() && hasMeasurementGroup() && hasTrackingIdentifier() && hasTrackingUniqueIdentifier() && - hasReferencedSegment() && hasSourceSeriesForSegmentation() && hasROIMeasurements(); + hasReferencedSegment() && hasSourceSeriesForSegmentation() && hasMeasurements(OFTrue /*checkChildren*/); } @@ -134,10 +140,43 @@ OFBool TID1411_VolumetricROIMeasurements::hasSourceSeriesForSegm template -OFBool TID1411_VolumetricROIMeasurements::hasROIMeasurements() const +OFBool TID1411_VolumetricROIMeasurements::hasMeasurements(const OFBool checkChildren) const { - /* check for content item at TID 1419 (ROI Measurements) Row 5 */ - return (getEntryFromNodeList(LAST_MEASUREMENT) > 0); + OFBool result = OFFalse; + /* need to check for child nodes? */ + if (checkChildren) + { + DSRDocumentTreeNodeCursor cursor(getRoot()); + /* go to content item at TID 1411 (Volumetric ROI Measurements) Row 13 */ + if (gotoEntryFromNodeList(cursor, LAST_MEASUREMENT) > 0) + { + /* check whether any of the "included TID 1419 templates" is non-empty */ + while (cursor.isValid() && (cursor.getNode()->getValueType() == VT_includedTemplate)) + { + const DSRSubTemplate *subTempl = OFstatic_cast(const DSRIncludedTemplateTreeNode *, cursor.getNode())->getValue().get(); + if (subTempl != NULL) + { + if (subTempl->compareTemplateIdentication("1419", "DCMR")) + { + result = !subTempl->isEmpty(); + if (result) break; + } else { + /* exit loop */ + break; + } + } + if (cursor.gotoPrevious() == 0) + { + /* invalidate cursor */ + cursor.clear(); + } + } + } + } else { + /* check for content item at TID 1411 (Volumetric ROI Measurements) Row 13 */ + result = (getEntryFromNodeList(LAST_MEASUREMENT) > 0); + } + return result; } @@ -429,35 +468,14 @@ OFCondition TID1411_VolumetricROIMeasurements::setMeasurem template -OFCondition TID1411_VolumetricROIMeasurements::setFindingSite(const DSRCodedEntryValue &site, +OFCondition TID1411_VolumetricROIMeasurements::addFindingSite(const DSRCodedEntryValue &site, + const CID244e_Laterality &laterality, + const DSRCodedEntryValue &siteModifier, const OFBool check) { OFCondition result = EC_Normal; - /* basic check of parameter */ + /* basic check of mandatory parameter */ if (site.isComplete()) - { - /* check whether measurement group already exists */ - if (!hasMeasurementGroup()) - result = createMeasurementGroup(); - /* TID 1419 (ROI Measurements) Row 2 */ - CHECK_RESULT(addOrReplaceContentItem(FINDING_SITE, RT_hasConceptMod, VT_Code, CODE_SRT_FindingSite, "TID 1419 - Row 2", check)); - CHECK_RESULT(getCurrentContentItem().setCodeValue(site, check)); - } else - result = EC_IllegalParameter; - return result; -} - - -template -OFCondition TID1411_VolumetricROIMeasurements::addMeasurement(const T_Measurement &conceptName, - const MeasurementValue &numericValue, - const T_Method &method, - const T_Derivation &derivation, - const OFBool check) -{ - OFCondition result = EC_Normal; - /* basic check of mandatory parameters */ - if (conceptName.hasSelectedValue() && numericValue.isComplete()) { /* check whether measurement group already exists */ if (!hasMeasurementGroup()) @@ -468,41 +486,41 @@ OFCondition TID1411_VolumetricROIMeasurementsaddContentItem(RT_contains, VT_Num, conceptName, check)); - CHECK_RESULT(subTree->getCurrentContentItem().setNumericValue(numericValue, check)); - CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 5")); + /* TID 1419 (ROI Measurements) Row 2 */ + CHECK_RESULT(subTree->addContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_FindingSite, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(site, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 2")); const size_t lastNode = subTree->getNodeID(); - /* TID 1419 (ROI Measurements) Row 7 - optional */ - if (method.hasSelectedValue()) + /* TID 1419 (ROI Measurements) Row 3 - optional */ + if (laterality.hasSelectedValue()) { - CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_MeasurementMethod, check)); - CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(method, check)); - CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 7")); + CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_Laterality, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(laterality, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 3")); GOOD_RESULT(subTree->gotoParent()); } - /* TID 1419 (ROI Measurements) Row 8 - optional */ - if (derivation.hasSelectedValue()) + /* TID 1419 (ROI Measurements) Row 4 - optional */ + if (siteModifier.isComplete()) { - CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_DCM_Derivation, check)); - CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(derivation, check)); - CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 8")); + CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_TopographicalModifier, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(siteModifier, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 4")); GOOD_RESULT(subTree->gotoParent()); } /* if everything was OK, insert new subtree into the template */ if (result.good() && !subTree->isEmpty()) { /* go to last measurement (if any) */ - if (gotoLastEntryFromNodeList(this, LAST_MEASUREMENT) > 0) + if (gotoLastEntryFromNodeList(this, LAST_FINDING_SITE) == getEntryFromNodeList(MEASUREMENT_GROUP)) { - /* insert subtree at current position */ + /* insert subtree below root */ + STORE_RESULT(insertSubTree(subTree, AM_belowCurrent)); + } else { + /* insert subtree after current position */ STORE_RESULT(insertSubTree(subTree, AM_afterCurrent)); - /* store ID of recently added node for later use */ - GOOD_RESULT(storeEntryInNodeList(LAST_MEASUREMENT, lastNode)); - } else { - /* should never happen but ... */ - result = CMR_EC_NoMeasurementGroup; } + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_FINDING_SITE, lastNode)); /* in case of error, make sure that memory is freed */ BAD_RESULT(delete subTree); } else { @@ -511,6 +529,120 @@ OFCondition TID1411_VolumetricROIMeasurements +OFCondition TID1411_VolumetricROIMeasurements::addMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool checkEmpty, + const OFBool checkValue) +{ + OFCondition result = EC_Normal; + /* basic check of mandatory parameters */ + if (conceptName.hasSelectedValue() && numericValue.isComplete()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + if (result.good()) + { + /* go to content item at TID 1411 (Volumetric ROI Measurements) Row 15 */ + if (gotoEntryFromNodeList(this, LAST_MEASUREMENT) > 0) + { + /* check whether the current instance of TID 1419 is non-empty (if needed) */ + if (checkEmpty && Measurement->isEmpty()) + result = getMeasurement().createNewMeasurement(conceptName, numericValue, checkValue); + else { + /* create new instance of TID 1419 (ROI Measurements) */ + TID1419_Measurement *subTempl = new TID1419_Measurement(conceptName, numericValue, checkValue); + if (subTempl != NULL) + { + /* store (shared) reference to new instance */ + Measurement.reset(subTempl); + /* and add it to the current template (TID 1411 - Row 15) */ + STORE_RESULT(includeTemplate(Measurement, AM_afterCurrent, RT_contains)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1411 - Row 15")); + GOOD_RESULT(storeEntryInNodeList(LAST_MEASUREMENT, getNodeID())); + /* tbc: what if the call of includeTemplate() fails? */ + } else + result = EC_MemoryExhausted; + } + } else + result = CMR_EC_NoMeasurementGroup; + } + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1411_VolumetricROIMeasurements::addQualitativeEvaluation(const DSRCodedEntryValue &conceptName, + const DSRCodedEntryValue &codeValue, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* make sure that the parameters are non-empty */ + if (conceptName.isComplete() && codeValue.isComplete()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + if (result.good()) + { + /* go to last qualitative evaluation (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_QUALITATIVE_EVALUATION) == getEntryFromNodeList(MEASUREMENT_GROUP)) + { + /* insert TID 1411 (Volumetric ROI Measurements) Row 16 below root */ + STORE_RESULT(addChildContentItem(RT_contains, VT_Code, conceptName, check)); + } else { + /* insert TID 1411 (Volumetric ROI Measurements) Row 16 after current position */ + STORE_RESULT(addContentItem(RT_contains, VT_Code, conceptName, check)); + } + CHECK_RESULT(getCurrentContentItem().setCodeValue(codeValue, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1411 - Row 16")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_QUALITATIVE_EVALUATION, getNodeID())); + } + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1411_VolumetricROIMeasurements::addQualitativeEvaluation(const DSRCodedEntryValue &conceptName, + const OFString &stringValue, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* make sure that the parameters are non-empty */ + if (conceptName.isComplete() && !stringValue.empty()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + if (result.good()) + { + /* go to last qualitative evaluation (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_QUALITATIVE_EVALUATION) == getEntryFromNodeList(MEASUREMENT_GROUP)) + { + /* insert TID 1411 (Volumetric ROI Measurements) Row 17 below root */ + STORE_RESULT(addChildContentItem(RT_contains, VT_Text, conceptName, check)); + } else { + /* insert TID 1411 (Volumetric ROI Measurements) Row 17 after current position */ + STORE_RESULT(addContentItem(RT_contains, VT_Text, conceptName, check)); + } + CHECK_RESULT(getCurrentContentItem().setStringValue(stringValue, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1411 - Row 17")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_QUALITATIVE_EVALUATION, getNodeID())); } } else result = EC_IllegalParameter; @@ -529,8 +661,13 @@ OFCondition TID1411_VolumetricROIMeasurements::createMeasurement /* TID 1411 (Volumetric ROI Measurements) Row 1 */ STORE_RESULT(addContentItem(RT_unknown, VT_Container, CODE_DCM_MeasurementGroup)); CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1411 - Row 1")); - /* store ID of root node for later use */ GOOD_RESULT(storeEntryInNodeList(MEASUREMENT_GROUP, getNodeID())); + /* TID 1411 (Volumetric ROI Measurements) Row 15 */ + CHECK_RESULT(includeTemplate(Measurement, AM_belowCurrent, RT_contains)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1411 - Row 15")); + GOOD_RESULT(storeEntryInNodeList(LAST_MEASUREMENT, getNodeID())); + /* if anything went wrong, clear the report */ + BAD_RESULT(clear()); } return result; } @@ -586,6 +723,7 @@ OFCondition TID1411_VolumetricROIMeasurements::addOrReplaceConte } else { DCMSR_CMR_DEBUG("Replacing value of '" << conceptName.getCodeMeaning() << "' content item (" << annotationText << ")"); + /* the actual replacing of the value is done by the caller of this method */ } } else result = SR_EC_InvalidTemplateStructure; diff --git a/dcmsr/libcmr/tid1419m.cc b/dcmsr/libcmr/tid1419m.cc new file mode 100644 index 00000000..6789558d --- /dev/null +++ b/dcmsr/libcmr/tid1419m.cc @@ -0,0 +1,452 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Source file for class TID1419_ROIMeasurements_Measurement + * + * Author: Joerg Riesmeier + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/cmr/tid1419m.h" +#include "dcmtk/dcmsr/cmr/tid15def.h" +#include "dcmtk/dcmsr/cmr/cid6147.h" +#include "dcmtk/dcmsr/cmr/cid7181.h" +#include "dcmtk/dcmsr/cmr/cid7464.h" +#include "dcmtk/dcmsr/cmr/cid7469.h" +#include "dcmtk/dcmsr/cmr/logger.h" +#include "dcmtk/dcmsr/codes/dcm.h" +#include "dcmtk/dcmsr/codes/srt.h" + +#include "dcmtk/dcmdata/dcdeftag.h" +#include "dcmtk/dcmdata/dcuid.h" + + +// helper macros for checking the return value of API calls +#define CHECK_RESULT(call) if (result.good()) result = call +#define STORE_RESULT(call) result = call +#define GOOD_RESULT(call) if (result.good()) call +#define BAD_RESULT(call) if (result.bad()) call + +// index positions in node list (makes source code more readable) +#define MEASUREMENT 0 +#define LAST_MODIFIER 1 +#define MEASUREMENT_METHOD 2 +#define DERIVATION 3 +#define LAST_FINDING_SITE 4 +#define LAST_DERIVATION_PARAMETER 5 +#define EQUIVALENT_MEANING 6 +#define REAL_WORLD_VALUE_MAP 7 +#define NUMBER_OF_LIST_ENTRIES 8 + +// general information on TID 1419 (ROI Measurements) +#define TEMPLATE_NUMBER "1419" +#define MAPPING_RESOURCE "DCMR" +#define MAPPING_RESOURCE_UID UID_DICOMContentMappingResource +#define TEMPLATE_TYPE OFTrue /* extensible */ +#define TEMPLATE_ORDER OFFalse /* non-significant */ + + +template +TID1419_ROIMeasurements_Measurement::TID1419_ROIMeasurements_Measurement() + : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID) +{ + setExtensible(TEMPLATE_TYPE); + setOrderSignificant(TEMPLATE_ORDER); + /* need to store position of various content items */ + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES, OFTrue /*initialize*/); +} + + +template +TID1419_ROIMeasurements_Measurement::TID1419_ROIMeasurements_Measurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check) + : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID) +{ + setExtensible(TEMPLATE_TYPE); + setOrderSignificant(TEMPLATE_ORDER); + /* need to store position of various content items */ + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES, OFTrue /*initialize*/); + /* create the mandatory "root" content item */ + createMeasurement(conceptName, numericValue, check); +} + + +template +void TID1419_ROIMeasurements_Measurement::clear() +{ + DSRSubTemplate::clear(); +} + + +template +OFBool TID1419_ROIMeasurements_Measurement::isValid() const +{ + /* check whether base class is valid and all required content items are present */ + return DSRSubTemplate::isValid() && hasMeasurement(); +} + + +template +OFBool TID1419_ROIMeasurements_Measurement::hasMeasurement() const +{ + /* check for content item at TID 1419 (Measurement) Row 5 */ + return (getEntryFromNodeList(MEASUREMENT) > 0); +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::createNewMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check) +{ + clear(); + /* TID 1419 (Measurement) Row 5 */ + return createMeasurement(conceptName, numericValue, check); +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::addModifier(const DSRCodedEntryValue &conceptName, + const DSRCodedEntryValue &modifier, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameters */ + if (conceptName.isComplete() && modifier.isComplete()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* go to last instance of TID 1419 (ROI Measurements) Row 6 (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_MODIFIER) == getEntryFromNodeList(MEASUREMENT)) + { + /* need to add the new content item as the first child */ + if (addContentItem(RT_hasConceptMod, VT_Code, AM_belowCurrentBeforeFirstChild) > 0) + { + if (getCurrentContentItem().setConceptName(conceptName, check).good()) + result = EC_Normal; + else + result = SR_EC_InvalidConceptName; + } else + result = SR_EC_CannotAddContentItem; + } else + STORE_RESULT(addContentItem(RT_hasConceptMod, VT_Code, conceptName, check)); + CHECK_RESULT(getCurrentContentItem().setCodeValue(modifier, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1419 - Row 6")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_MODIFIER, getNodeID())); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::setMeasurementMethod(const T_Method &method, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameter */ + if (method.hasSelectedValue()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* TID 1419 (ROI Measurements) Row 7 */ + STORE_RESULT(addOrReplaceContentItem(MEASUREMENT_METHOD, RT_hasConceptMod, VT_Code, CODE_SRT_MeasurementMethod, "TID 1419 - Row 7", check)); + CHECK_RESULT(getCurrentContentItem().setCodeValue(method, check)); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::setDerivation(const T_Derivation &derivation, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameter */ + if (derivation.hasSelectedValue()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* TID 1419 (ROI Measurements) Row 8 */ + STORE_RESULT(addOrReplaceContentItem(DERIVATION, RT_hasConceptMod, VT_Code, CODE_DCM_Derivation, "TID 1419 - Row 8", check)); + CHECK_RESULT(getCurrentContentItem().setCodeValue(derivation, check)); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::addFindingSite(const DSRCodedEntryValue &site, + const CID244e_Laterality &laterality, + const DSRCodedEntryValue &siteModifier, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of mandatory parameter */ + if (site.isComplete()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* create a new subtree in order to "rollback" in case of error */ + DSRDocumentSubTree *subTree = new DSRDocumentSubTree; + if (subTree != NULL) + { + /* TID 1419 (ROI Measurements) Row 9 */ + CHECK_RESULT(subTree->addContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_FindingSite, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(site, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 9")); + const size_t lastNode = subTree->getNodeID(); + /* TID 1419 (ROI Measurements) Row 10 - optional */ + if (laterality.hasSelectedValue()) + { + CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_Laterality, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(laterality, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 10")); + GOOD_RESULT(subTree->gotoParent()); + } + /* TID 1419 (ROI Measurements) Row 11 - optional */ + if (siteModifier.isComplete()) + { + CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_TopographicalModifier, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(siteModifier, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1419 - Row 11")); + GOOD_RESULT(subTree->gotoParent()); + } + /* if everything was OK, insert new subtree into the template */ + if (result.good() && !subTree->isEmpty()) + { + /* go to last measurement (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_FINDING_SITE) == getEntryFromNodeList(MEASUREMENT)) + { + /* insert subtree below root */ + STORE_RESULT(insertSubTree(subTree, AM_belowCurrent)); + } else { + /* insert subtree after current position */ + STORE_RESULT(insertSubTree(subTree, AM_afterCurrent)); + } + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_FINDING_SITE, lastNode)); + /* in case of error, make sure that memory is freed */ + BAD_RESULT(delete subTree); + } else { + /* delete the new subtree since it has not been inserted */ + delete subTree; + } + } else + result = EC_MemoryExhausted; + } else + result = CMR_EC_NoMeasurement; + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::addDerivationParameter(const DSRCodedEntryValue &conceptName, + const CMR_SRNumericMeasurementValue &numericValue, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameters */ + if (conceptName.isComplete() && numericValue.isComplete()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* go to last derivation parameter (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_DERIVATION_PARAMETER) == getEntryFromNodeList(MEASUREMENT)) + { + /* insert TID 1419 (ROI Measurements) Row 13 below root */ + STORE_RESULT(addChildContentItem(RT_inferredFrom, VT_Num, conceptName, check)); + } else { + /* insert TID 1419 (ROI Measurements) Row 13 after current position */ + STORE_RESULT(addContentItem(RT_inferredFrom, VT_Num, conceptName, check)); + } + CHECK_RESULT(getCurrentContentItem().setNumericValue(numericValue, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1419 - Row 13")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_DERIVATION_PARAMETER, getNodeID())); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::setEquivalentMeaningOfConceptName(const OFString &meaning, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (!meaning.empty()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* TID 1419 (ROI Measurements) Row 18 */ + CHECK_RESULT(addOrReplaceContentItem(EQUIVALENT_MEANING, RT_hasConceptMod, VT_Text, CODE_DCM_EquivalentMeaningOfConceptName, "TID 1419 - Row 18", check)); + CHECK_RESULT(getCurrentContentItem().setStringValue(meaning, check)); + } else + result = CMR_EC_NoMeasurement; + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::setRealWorldValueMap(const DSRCompositeReferenceValue &valueMap, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (valueMap.isComplete()) + { + const char *annotationText = "TID 1419 - Row 19"; + const DSRBasicCodedEntry conceptName(CODE_DCM_RealWorldValueMapUsedForMeasurement); + /* check for real world value mapping SOP classes */ + if (valueMap.getSOPClassUID() != UID_RealWorldValueMappingStorage) + { + DCMSR_CMR_WARN("Cannot set value of '" << conceptName.CodeMeaning << "' content item (" << annotationText << ") ... wrong SOP Class"); + DCMSR_CMR_DEBUG("SOP Class UID \"" << valueMap.getSOPClassUID() << "\" does not match the one of the Real World Value Mapping object"); + result = CMR_EC_InvalidRealWorldValueMappingObject; + } else { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* TID 1419 (ROI Measurements) Row 19 */ + CHECK_RESULT(addOrReplaceContentItem(REAL_WORLD_VALUE_MAP, RT_inferredFrom, VT_Composite, conceptName, annotationText, check)); + CHECK_RESULT(getCurrentContentItem().setCompositeReference(valueMap, check)); + } else + result = CMR_EC_NoMeasurement; + } + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::setRealWorldValueMap(DcmItem &dataset, + const OFBool check) +{ + DSRCompositeReferenceValue valueMap; + /* first, create the referenced composite object */ + OFCondition result = valueMap.setReference(dataset, check); + /* then, add/set the corresponding content item */ + CHECK_RESULT(setRealWorldValueMap(valueMap, check)); + return result; +} + + +// protected methods + +template +OFCondition TID1419_ROIMeasurements_Measurement::createMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameters */ + if (conceptName.hasSelectedValue() && numericValue.isComplete()) + { + /* reassure that the tree is definitely empty */ + if (isEmpty()) + { + /* TID 1419 (ROI Measurements) Row 5 */ + STORE_RESULT(addContentItem(RT_unknown, VT_Num, conceptName, check)); + CHECK_RESULT(getCurrentContentItem().setNumericValue(numericValue, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1419 - Row 5")); + GOOD_RESULT(storeEntryInNodeList(MEASUREMENT, getNodeID())); + } else + result = SR_EC_InvalidTemplateStructure; + } + return result; +} + + +template +OFCondition TID1419_ROIMeasurements_Measurement::addOrReplaceContentItem(const size_t nodePos, + const E_RelationshipType relationshipType, + const E_ValueType valueType, + const DSRCodedEntryValue &conceptName, + const OFString &annotationText, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* check concept name and coded entry value */ + if (conceptName.isComplete()) + { + /* check whether content item already exists */ + if (getEntryFromNodeList(nodePos) == 0) + { + /* if not, create the content item (at correct position) */ + if (gotoLastEntryFromNodeList(this, nodePos) == getEntryFromNodeList(MEASUREMENT)) + { + /* need to add the new content item as the first child */ + if (addContentItem(relationshipType, valueType, AM_belowCurrentBeforeFirstChild) > 0) + { + if (getCurrentContentItem().setConceptName(conceptName, check).bad()) + result = SR_EC_InvalidConceptName; + } else + result = SR_EC_CannotAddContentItem; + + } else { + /* add new content item as a sibling (after the current one) */ + STORE_RESULT(addContentItem(relationshipType, valueType, conceptName)); + } + /* store ID of added node for later use */ + GOOD_RESULT(storeEntryInNodeList(nodePos, getNodeID())); + } + else if (gotoEntryFromNodeList(this, nodePos) > 0) + { + /* make sure that the value type of the existing content item is correct */ + if (getCurrentContentItem().getValueType() != valueType) + { + DCMSR_CMR_WARN("Cannot replace value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ") ... wrong value type"); + result = SR_EC_InvalidContentItem; + } + else if (getCurrentContentItem().getConceptName() != conceptName) + { + DCMSR_CMR_WARN("Cannot replace value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ") ... wrong concept name"); + result = SR_EC_InvalidConceptName; + } else { + DCMSR_CMR_DEBUG("Replacing value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ")"); + /* the actual replacing of the value is done by the caller of this method */ + } + } else + result = SR_EC_InvalidTemplateStructure; + /* finally, set annotation */ + CHECK_RESULT(getCurrentContentItem().setAnnotationText(annotationText)); + } else + result = SR_EC_InvalidConceptName; + return result; +} + + +// explicit template instantiation (needed for use in TID 1411) +template class TID1419_ROIMeasurements_Measurement; diff --git a/dcmsr/libcmr/tid1500.cc b/dcmsr/libcmr/tid1500.cc index 307911c0..c3e7bc76 100644 --- a/dcmsr/libcmr/tid1500.cc +++ b/dcmsr/libcmr/tid1500.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class TID1500_MeasurementReport @@ -13,6 +13,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmsr/cmr/tid1500.h" +#include "dcmtk/dcmsr/cmr/tid15def.h" #include "dcmtk/dcmsr/cmr/logger.h" #include "dcmtk/dcmsr/codes/dcm.h" #include "dcmtk/dcmsr/codes/umls.h" @@ -33,31 +34,34 @@ #define LAST_PROCEDURE_REPORTED 2 #define IMAGING_MEASUREMENTS 3 #define LAST_VOLUMETRIC_ROI_MEASUREMENTS 4 -#define QUALITATIVE_EVALUATIONS 5 +#define LAST_MEASUREMENT_GROUP 5 +#define QUALITATIVE_EVALUATIONS 6 +#define NUMBER_OF_LIST_ENTRIES 7 // general information on TID 1500 (Measurement Report) #define TEMPLATE_NUMBER "1500" #define MAPPING_RESOURCE "DCMR" #define MAPPING_RESOURCE_UID UID_DICOMContentMappingResource -#define TEMPLATE_TYPE OFTrue /* extensible */ +#define TEMPLATE_TYPE OFTrue /* extensible */ +#define TEMPLATE_ORDER OFFalse /* non-significant */ -// conditions constants -makeOFConditionConst(CMR_EC_NoMeasurementReport, OFM_dcmsr, 1500, OF_error, "No Measurement Report"); - -TID1500_MeasurementReport::TID1500_MeasurementReport(const CID7021_MeasurementReportDocumentTitles &title) +TID1500_MeasurementReport::TID1500_MeasurementReport(const CID7021_MeasurementReportDocumentTitles &title, + const OFBool check) : DSRRootTemplate(DT_EnhancedSR, TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID), Language(new TID1204_LanguageOfContentItemAndDescendants()), ObservationContext(new TID1001_ObservationContext()), ImageLibrary(new TID1600_ImageLibrary()), - VolumetricROIMeasurements(new TID1411_Measurements()) + VolumetricROIMeasurements(new TID1411_Measurements()), + MeasurementGroup(new TID1501_Measurements()) { setExtensible(TEMPLATE_TYPE); + setOrderSignificant(TEMPLATE_ORDER); /* need to store position of various content items */ - reserveEntriesInNodeList(6, OFTrue /*initialize*/); + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES, OFTrue /*initialize*/); /* if specified, create an initial report */ if (title.hasSelectedValue()) - createMeasurementReport(title); + createMeasurementReport(title, check); } @@ -68,6 +72,7 @@ void TID1500_MeasurementReport::clear() ObservationContext->clear(); ImageLibrary->clear(); VolumetricROIMeasurements->clear(); + MeasurementGroup->clear(); } @@ -76,7 +81,9 @@ OFBool TID1500_MeasurementReport::isValid() const /* check whether base class is valid and all required content items are present */ return DSRRootTemplate::isValid() && Language->isValid() && ObservationContext->isValid() && ImageLibrary->isValid() && - hasProcedureReported() && (hasImagingMeasurements() || hasQualitativeEvaluations()); + hasProcedureReported() && (hasImagingMeasurements() || hasQualitativeEvaluations()) && + (VolumetricROIMeasurements->isEmpty() || VolumetricROIMeasurements->isValid()) && + (MeasurementGroup->isEmpty() || MeasurementGroup->isValid()); } @@ -164,6 +171,46 @@ OFBool TID1500_MeasurementReport::hasVolumetricROIMeasurements(const OFBool chec } +OFBool TID1500_MeasurementReport::hasIndividualMeasurements(const OFBool checkChildren) const +{ + OFBool result = OFFalse; + /* need to check for child nodes? */ + if (checkChildren) + { + DSRDocumentTreeNodeCursor cursor(getRoot()); + /* go to content item at TID 1500 (Measurement Report) Row 9 */ + if (gotoEntryFromNodeList(cursor, LAST_MEASUREMENT_GROUP) > 0) + { + /* check whether any of the "included TID 1501 templates" is non-empty */ + while (cursor.isValid() && (cursor.getNode()->getValueType() == VT_includedTemplate)) + { + const DSRSubTemplate *subTempl = OFstatic_cast(const DSRIncludedTemplateTreeNode *, cursor.getNode())->getValue().get(); + if (subTempl != NULL) + { + if (subTempl->compareTemplateIdentication("1501", "DCMR")) + { + result = !subTempl->isEmpty(); + if (result) break; + } else { + /* exit loop */ + break; + } + } + if (cursor.gotoPrevious() == 0) + { + /* invalidate cursor */ + cursor.clear(); + } + } + } + } else { + /* check for content item at TID 1500 (Measurement Report) Row 9 */ + result = (getEntryFromNodeList(LAST_MEASUREMENT_GROUP) > 0); + } + return result; +} + + OFBool TID1500_MeasurementReport::hasQualitativeEvaluations(const OFBool checkChildren) const { OFBool result = OFFalse; @@ -198,11 +245,12 @@ OFCondition TID1500_MeasurementReport::getDocumentTitle(DSRCodedEntryValue &titl } -OFCondition TID1500_MeasurementReport::createNewMeasurementReport(const CID7021_MeasurementReportDocumentTitles &title) +OFCondition TID1500_MeasurementReport::createNewMeasurementReport(const CID7021_MeasurementReportDocumentTitles &title, + const OFBool check) { clear(); /* TID 1500 (Measurement Report) Row 1 */ - return createMeasurementReport(title); + return createMeasurementReport(title, check); } @@ -238,26 +286,60 @@ OFCondition TID1500_MeasurementReport::addProcedureReported(const CID100_Quantit } -OFCondition TID1500_MeasurementReport::addVolumetricROIMeasurements() +OFCondition TID1500_MeasurementReport::addVolumetricROIMeasurements(const OFBool checkEmpty) { - OFCondition result = CMR_EC_NoMeasurementReport; + OFCondition result = EC_Normal; /* go to content item at TID 1500 (Measurement Report) Row 8 */ if (gotoEntryFromNodeList(this, LAST_VOLUMETRIC_ROI_MEASUREMENTS) > 0) { - /* create new instance of TID 1411 (Volumetric ROI Measurements) */ - TID1411_Measurements *subTempl = new TID1411_Measurements(); - if (subTempl != NULL) + /* check whether the current instance of TID 1411 is non-empty (if needed) */ + if (!checkEmpty || !VolumetricROIMeasurements->isEmpty()) { - /* store (shared) reference to new instance */ - VolumetricROIMeasurements.reset(subTempl); - /* and add it to the current template (TID 1500 - Row 8) */ - STORE_RESULT(includeTemplate(VolumetricROIMeasurements, AM_afterCurrent, RT_contains)); - CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 8")); - GOOD_RESULT(storeEntryInNodeList(LAST_VOLUMETRIC_ROI_MEASUREMENTS, getNodeID())); - /* tbc: what if the call of includeTemplate() fails? */ - } else - result = EC_MemoryExhausted; - } + /* create new instance of TID 1411 (Volumetric ROI Measurements) */ + TID1411_Measurements *subTempl = new TID1411_Measurements(); + if (subTempl != NULL) + { + /* store (shared) reference to new instance */ + VolumetricROIMeasurements.reset(subTempl); + /* and add it to the current template (TID 1500 - Row 8) */ + STORE_RESULT(includeTemplate(VolumetricROIMeasurements, AM_afterCurrent, RT_contains)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 8")); + GOOD_RESULT(storeEntryInNodeList(LAST_VOLUMETRIC_ROI_MEASUREMENTS, getNodeID())); + /* tbc: what if the call of includeTemplate() fails? */ + } else + result = EC_MemoryExhausted; + } + } else + result = CMR_EC_NoMeasurementReport; + return result; +} + + +OFCondition TID1500_MeasurementReport::addIndividualMeasurements(const OFBool checkEmpty) +{ + OFCondition result = EC_Normal; + /* go to content item at TID 1500 (Measurement Report) Row 9 */ + if (gotoEntryFromNodeList(this, LAST_MEASUREMENT_GROUP) > 0) + { + /* check whether the current instance of TID 1501 is non-empty (if needed) */ + if (!checkEmpty || !MeasurementGroup->isEmpty()) + { + /* create new instance of TID 1501 (Measurement Group) */ + TID1501_Measurements *subTempl = new TID1501_Measurements(); + if (subTempl != NULL) + { + /* store (shared) reference to new instance */ + MeasurementGroup.reset(subTempl); + /* and add it to the current template (TID 1500 - Row 9) */ + STORE_RESULT(includeTemplate(MeasurementGroup, AM_afterCurrent, RT_contains)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 9")); + GOOD_RESULT(storeEntryInNodeList(LAST_MEASUREMENT_GROUP, getNodeID())); + /* tbc: what if the call of includeTemplate() fails? */ + } else + result = EC_MemoryExhausted; + } + } else + result = CMR_EC_NoMeasurementReport; return result; } @@ -312,7 +394,8 @@ OFCondition TID1500_MeasurementReport::addQualitativeEvaluation(const DSRCodedEn // protected methods -OFCondition TID1500_MeasurementReport::createMeasurementReport(const CID7021_MeasurementReportDocumentTitles &title) +OFCondition TID1500_MeasurementReport::createMeasurementReport(const CID7021_MeasurementReportDocumentTitles &title, + const OFBool check) { OFCondition result = EC_IllegalParameter; /* make sure that there is a coded entry */ @@ -322,11 +405,10 @@ OFCondition TID1500_MeasurementReport::createMeasurementReport(const CID7021_Mea if (isEmpty()) { /* TID 1500 (Measurement Report) Row 1 */ - STORE_RESULT(addContentItem(RT_isRoot, VT_Container, title)); + STORE_RESULT(addContentItem(RT_isRoot, VT_Container, title, check)); CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 1")); /* store ID of root node for later use */ - if (result.good()) - storeEntryInNodeList(MEASUREMENT_REPORT, getNodeID()); + GOOD_RESULT(storeEntryInNodeList(MEASUREMENT_REPORT, getNodeID())); /* TID 1500 (Measurement Report) Row 2 */ CHECK_RESULT(includeTemplate(Language, AM_belowCurrent, RT_hasConceptMod)); CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 2")); @@ -345,6 +427,10 @@ OFCondition TID1500_MeasurementReport::createMeasurementReport(const CID7021_Mea CHECK_RESULT(includeTemplate(VolumetricROIMeasurements, AM_belowCurrent, RT_contains)); CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 8")); GOOD_RESULT(storeEntryInNodeList(LAST_VOLUMETRIC_ROI_MEASUREMENTS, getNodeID())); + /* TID 1500 (Measurement Report) Row 9 */ + CHECK_RESULT(includeTemplate(MeasurementGroup, AM_afterCurrent, RT_contains)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 9")); + GOOD_RESULT(storeEntryInNodeList(LAST_MEASUREMENT_GROUP, getNodeID())); /* if anything went wrong, clear the report */ BAD_RESULT(clear()); } else diff --git a/dcmsr/libcmr/tid1501.cc b/dcmsr/libcmr/tid1501.cc new file mode 100644 index 00000000..18622909 --- /dev/null +++ b/dcmsr/libcmr/tid1501.cc @@ -0,0 +1,599 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Source file for class TID1501_MeasurementGroup + * + * Author: Joerg Riesmeier + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/cmr/tid1501.h" +#include "dcmtk/dcmsr/cmr/tid15def.h" +#include "dcmtk/dcmsr/cmr/logger.h" +#include "dcmtk/dcmsr/codes/dcm.h" +#include "dcmtk/dcmsr/codes/ncit.h" +#include "dcmtk/dcmsr/codes/srt.h" +#include "dcmtk/dcmsr/codes/umls.h" +#include "dcmtk/dcmsr/dsrtpltn.h" + +#include "dcmtk/dcmdata/dcuid.h" + + +// helper macros for checking the return value of API calls +#define CHECK_RESULT(call) if (result.good()) result = call +#define STORE_RESULT(call) result = call +#define GOOD_RESULT(call) if (result.good()) call +#define BAD_RESULT(call) if (result.bad()) call + +// index positions in node list (makes source code more readable) +#define MEASUREMENT_GROUP 0 +#define ACTIVITY_SESSION 1 +#define TRACKING_IDENTIFIER 2 +#define TRACKING_UNIQUE_IDENTIFIER 3 +#define FINDING 4 +#define TIME_POINT 5 +#define MEASUREMENT_METHOD 6 +#define LAST_FINDING_SITE 7 +#define REAL_WORLD_VALUE_MAP 8 +#define LAST_MEASUREMENT 9 +#define LAST_QUALITATIVE_EVALUATION 10 +#define NUMBER_OF_LIST_ENTRIES 11 + +// general information on TID 1501 (Measurement Group) +#define TEMPLATE_NUMBER "1501" +#define MAPPING_RESOURCE "DCMR" +#define MAPPING_RESOURCE_UID UID_DICOMContentMappingResource +#define TEMPLATE_TYPE OFTrue /* extensible */ +#define TEMPLATE_ORDER OFFalse /* non-significant */ + + +template +TID1501_MeasurementGroup::TID1501_MeasurementGroup(const OFBool createGroup) + : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID), + Measurement(new TID300_Measurement()) +{ + setExtensible(TEMPLATE_TYPE); + setOrderSignificant(TEMPLATE_ORDER); + /* need to store position of various content items */ + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES, OFTrue /*initialize*/); + /* TID 1501 (Measurement Group) Row 1 */ + if (createGroup) + createMeasurementGroup(); +} + + +template +void TID1501_MeasurementGroup::clear() +{ + DSRSubTemplate::clear(); + Measurement->clear(); +} + + +template +OFBool TID1501_MeasurementGroup::isValid() const +{ + /* check whether base class is valid and all required content items are present */ + return DSRSubTemplate::isValid() && + hasMeasurementGroup() && hasTrackingIdentifier() && hasTrackingUniqueIdentifier() && + hasMeasurements(OFTrue /*checkChildren*/); +} + + +template +OFBool TID1501_MeasurementGroup::hasMeasurementGroup(const OFBool checkChildren) const +{ + OFBool result = OFFalse; + /* need to check for child nodes? */ + if (checkChildren) + { + DSRDocumentTreeNodeCursor cursor(getRoot()); + /* go to content item at TID 1501 (Measurement Group) Row 1 */ + if (gotoEntryFromNodeList(cursor, MEASUREMENT_GROUP) > 0) + result = cursor.hasChildNodes(); + } else { + /* check for content item at TID 1501 (Measurement Group) Row 1 */ + result = (getEntryFromNodeList(MEASUREMENT_GROUP) > 0); + } + return result; +} + + +template +OFBool TID1501_MeasurementGroup::hasTrackingIdentifier() const +{ + /* check for content item at TID 1501 (Measurement Group) Row 2 */ + return (getEntryFromNodeList(TRACKING_IDENTIFIER) > 0); +} + + +template +OFBool TID1501_MeasurementGroup::hasTrackingUniqueIdentifier() const +{ + /* check for content item at TID 1501 (Measurement Group) Row 3 */ + return (getEntryFromNodeList(TRACKING_UNIQUE_IDENTIFIER) > 0); +} + + +template +OFBool TID1501_MeasurementGroup::hasMeasurements(const OFBool checkChildren) const +{ + OFBool result = OFFalse; + /* need to check for child nodes? */ + if (checkChildren) + { + DSRDocumentTreeNodeCursor cursor(getRoot()); + /* go to content item at TID 1501 (Measurement Group) Row 10 */ + if (gotoEntryFromNodeList(cursor, LAST_MEASUREMENT) > 0) + { + /* check whether any of the "included TID 300 templates" is non-empty */ + while (cursor.isValid() && (cursor.getNode()->getValueType() == VT_includedTemplate)) + { + const DSRSubTemplate *subTempl = OFstatic_cast(const DSRIncludedTemplateTreeNode *, cursor.getNode())->getValue().get(); + if (subTempl != NULL) + { + if (subTempl->compareTemplateIdentication("300", "DCMR")) + { + result = !subTempl->isEmpty(); + if (result) break; + } else { + /* exit loop */ + break; + } + } + if (cursor.gotoPrevious() == 0) + { + /* invalidate cursor */ + cursor.clear(); + } + } + } + } else { + /* check for content item at TID 1501 (Measurement Group) Row 10 */ + result = (getEntryFromNodeList(LAST_MEASUREMENT) > 0); + } + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::setActivitySession(const OFString &session, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (!session.empty()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + /* TID 1501 (Measurement Group) Row 1b */ + CHECK_RESULT(addOrReplaceContentItem(ACTIVITY_SESSION, RT_hasObsContext, VT_Text, CODE_NCIt_ActivitySession, "TID 1501 - Row 1b", check)); + CHECK_RESULT(getCurrentContentItem().setStringValue(session, check)); + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::setTrackingIdentifier(const OFString &trackingID, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (!trackingID.empty()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + /* TID 1501 (Measurement Group) Row 2 */ + CHECK_RESULT(addOrReplaceContentItem(TRACKING_IDENTIFIER, RT_hasObsContext, VT_Text, CODE_DCM_TrackingIdentifier, "TID 1501 - Row 2", check)); + CHECK_RESULT(getCurrentContentItem().setStringValue(trackingID, check)); + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::setTrackingUniqueIdentifier(const OFString &trackingUID, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (!trackingUID.empty()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + /* TID 1501 (Measurement Group) Row 3 */ + CHECK_RESULT(addOrReplaceContentItem(TRACKING_UNIQUE_IDENTIFIER, RT_hasObsContext, VT_UIDRef, CODE_DCM_TrackingUniqueIdentifier, "TID 1501 - Row 3", check)); + CHECK_RESULT(getCurrentContentItem().setStringValue(trackingUID, check)); + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::setFinding(const DSRCodedEntryValue &finding, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (finding.isComplete()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + /* TID 1501 (Measurement Group) Row 3b */ + CHECK_RESULT(addOrReplaceContentItem(FINDING, RT_contains, VT_Code, CODE_DCM_Finding, "TID 1501 - Row 3b", check)); + CHECK_RESULT(getCurrentContentItem().setCodeValue(finding, check)); + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::setTimePoint(const OFString &timePoint, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (!timePoint.empty()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + /* TID 1502 (Time Point Context) Row 3 */ + CHECK_RESULT(addOrReplaceContentItem(TIME_POINT, RT_hasObsContext, VT_Text, CODE_UMLS_TimePoint, "TID 1502 - Row 3", check)); + CHECK_RESULT(getCurrentContentItem().setStringValue(timePoint, check)); + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::setMeasurementMethod(const T_Method &method, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (method.hasSelectedValue()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + /* TID 1501 (Measurement Group) Row 5 */ + CHECK_RESULT(addOrReplaceContentItem(MEASUREMENT_METHOD, RT_hasConceptMod, VT_Code, CODE_SRT_MeasurementMethod, "TID 1501 - Row 5", check)); + CHECK_RESULT(getCurrentContentItem().setCodeValue(method, check)); + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::addFindingSite(const DSRCodedEntryValue &site, + const CID244e_Laterality &laterality, + const DSRCodedEntryValue &siteModifier, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of mandatory parameter */ + if (site.isComplete()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + if (result.good()) + { + /* create a new subtree in order to "rollback" in case of error */ + DSRDocumentSubTree *subTree = new DSRDocumentSubTree; + if (subTree != NULL) + { + /* 1501 (Measurement Group) Row 6 */ + CHECK_RESULT(subTree->addContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_FindingSite, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(site, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1501 - Row 6")); + const size_t lastNode = subTree->getNodeID(); + /* 1501 (Measurement Group) Row 7 - optional */ + if (laterality.hasSelectedValue()) + { + CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_Laterality, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(laterality, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1501 - Row 7")); + GOOD_RESULT(subTree->gotoParent()); + } + /* 1501 (Measurement Group) Row 8 - optional */ + if (siteModifier.isComplete()) + { + CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_TopographicalModifier, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(siteModifier, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 1501 - Row 8")); + GOOD_RESULT(subTree->gotoParent()); + } + /* if everything was OK, insert new subtree into the template */ + if (result.good() && !subTree->isEmpty()) + { + /* go to last measurement (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_FINDING_SITE) > 0) + { + /* insert subtree at current position */ + STORE_RESULT(insertSubTree(subTree, AM_afterCurrent)); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_FINDING_SITE, lastNode)); + } else { + /* should never happen but ... */ + result = CMR_EC_NoMeasurementGroup; + } + /* in case of error, make sure that memory is freed */ + BAD_RESULT(delete subTree); + } else { + /* delete the new subtree since it has not been inserted */ + delete subTree; + } + } else + result = EC_MemoryExhausted; + } + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::setRealWorldValueMap(const DSRCompositeReferenceValue &valueMap, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (valueMap.isComplete()) + { + const char *annotationText = "TID 1501 - Row 9"; + const DSRBasicCodedEntry conceptName(CODE_DCM_RealWorldValueMapUsedForMeasurement); + /* check for real world value mapping SOP classes */ + if (valueMap.getSOPClassUID() != UID_RealWorldValueMappingStorage) + { + DCMSR_CMR_WARN("Cannot set value of '" << conceptName.CodeMeaning << "' content item (" << annotationText << ") ... wrong SOP Class"); + DCMSR_CMR_DEBUG("SOP Class UID \"" << valueMap.getSOPClassUID() << "\" does not match the one of the Real World Value Mapping object"); + result = CMR_EC_InvalidRealWorldValueMappingObject; + } else { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + /* TID 15011 (Measurement Group) Row 9 */ + CHECK_RESULT(addOrReplaceContentItem(REAL_WORLD_VALUE_MAP, RT_contains, VT_Composite, conceptName, annotationText, check)); + CHECK_RESULT(getCurrentContentItem().setCompositeReference(valueMap, check)); + } + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::setRealWorldValueMap(DcmItem &dataset, + const OFBool check) +{ + DSRCompositeReferenceValue valueMap; + /* first, create the referenced composite object */ + OFCondition result = valueMap.setReference(dataset, check); + /* then, add/set the corresponding content item */ + CHECK_RESULT(setRealWorldValueMap(valueMap, check)); + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::addMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool checkEmpty, + const OFBool checkValue) +{ + OFCondition result = EC_Normal; + /* basic check of mandatory parameters */ + if (conceptName.hasSelectedValue() && numericValue.isComplete()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + if (result.good()) + { + /* go to content item at TID 1501 (Measurement Report) Row 10 */ + if (gotoEntryFromNodeList(this, LAST_MEASUREMENT) > 0) + { + /* check whether the current instance of TID 300 is non-empty (if needed) */ + if (checkEmpty && Measurement->isEmpty()) + result = getMeasurement().createNewMeasurement(conceptName, numericValue, checkValue); + else { + /* create new instance of TID 300 (Measurement) */ + TID300_Measurement *subTempl = new TID300_Measurement(conceptName, numericValue, checkValue); + if (subTempl != NULL) + { + /* store (shared) reference to new instance */ + Measurement.reset(subTempl); + /* and add it to the current template (TID 1501 - Row 10) */ + STORE_RESULT(includeTemplate(Measurement, AM_afterCurrent, RT_contains)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1501 - Row 10")); + GOOD_RESULT(storeEntryInNodeList(LAST_MEASUREMENT, getNodeID())); + /* tbc: what if the call of includeTemplate() fails? */ + } else + result = EC_MemoryExhausted; + } + } else + result = CMR_EC_NoMeasurementGroup; + } + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::addQualitativeEvaluation(const DSRCodedEntryValue &conceptName, + const DSRCodedEntryValue &codeValue, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* make sure that the parameters are non-empty */ + if (conceptName.isComplete() && codeValue.isComplete()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + if (result.good()) + { + /* go to last qualitative evaluation (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_QUALITATIVE_EVALUATION) == getEntryFromNodeList(MEASUREMENT_GROUP)) + { + /* insert TID 1501 (Measurement Group) Row 11 below root */ + STORE_RESULT(addChildContentItem(RT_contains, VT_Code, conceptName, check)); + } else { + /* insert TID 1501 (Measurement Group) Row 11 after current position */ + STORE_RESULT(addContentItem(RT_contains, VT_Code, conceptName, check)); + } + CHECK_RESULT(getCurrentContentItem().setCodeValue(codeValue, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1501 - Row 11")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_QUALITATIVE_EVALUATION, getNodeID())); + } + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::addQualitativeEvaluation(const DSRCodedEntryValue &conceptName, + const OFString &stringValue, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* make sure that the parameters are non-empty */ + if (conceptName.isComplete() && !stringValue.empty()) + { + /* check whether measurement group already exists */ + if (!hasMeasurementGroup()) + result = createMeasurementGroup(); + if (result.good()) + { + /* go to last qualitative evaluation (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_QUALITATIVE_EVALUATION) == getEntryFromNodeList(MEASUREMENT_GROUP)) + { + /* insert TID 1501 (Measurement Group) Row 12 below root */ + STORE_RESULT(addChildContentItem(RT_contains, VT_Text, conceptName, check)); + } else { + /* insert TID 1501 (Measurement Group) Row 12 after current position */ + STORE_RESULT(addContentItem(RT_contains, VT_Text, conceptName, check)); + } + CHECK_RESULT(getCurrentContentItem().setStringValue(stringValue, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1501 - Row 12")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_QUALITATIVE_EVALUATION, getNodeID())); + } + } else + result = EC_IllegalParameter; + return result; +} + + +// protected methods + +template +OFCondition TID1501_MeasurementGroup::createMeasurementGroup() +{ + OFCondition result = SR_EC_InvalidTemplateStructure; + /* reassure that the tree is definitely empty */ + if (isEmpty()) + { + /* TID 1501 (Measurement Group) Row 1 */ + STORE_RESULT(addContentItem(RT_unknown, VT_Container, CODE_DCM_MeasurementGroup)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1501 - Row 1")); + GOOD_RESULT(storeEntryInNodeList(MEASUREMENT_GROUP, getNodeID())); + /* TID 1501 (Measurement) Row 10 */ + CHECK_RESULT(includeTemplate(Measurement, AM_belowCurrent, RT_contains)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1501 - Row 10")); + GOOD_RESULT(storeEntryInNodeList(LAST_MEASUREMENT, getNodeID())); + /* if anything went wrong, clear the report */ + BAD_RESULT(clear()); + } + return result; +} + + +template +OFCondition TID1501_MeasurementGroup::addOrReplaceContentItem(const size_t nodePos, + const E_RelationshipType relationshipType, + const E_ValueType valueType, + const DSRCodedEntryValue &conceptName, + const OFString &annotationText, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* check concept name and coded entry value */ + if (conceptName.isComplete()) + { + /* check whether content item already exists */ + if (getEntryFromNodeList(nodePos) == 0) + { + /* if not, create the content item (at correct position) */ + if (gotoLastEntryFromNodeList(this, nodePos) == getEntryFromNodeList(MEASUREMENT_GROUP)) + { + /* need to add the new content item as the first child */ + if (addContentItem(relationshipType, valueType, AM_belowCurrentBeforeFirstChild) > 0) + { + if (getCurrentContentItem().setConceptName(conceptName, check).bad()) + result = SR_EC_InvalidConceptName; + } else + result = SR_EC_CannotAddContentItem; + + } else { + /* add new content item as a sibling (after the current one) */ + STORE_RESULT(addContentItem(relationshipType, valueType, conceptName)); + } + /* store ID of added node for later use */ + GOOD_RESULT(storeEntryInNodeList(nodePos, getNodeID())); + } + else if (gotoEntryFromNodeList(this, nodePos) > 0) + { + /* make sure that the value type of the existing content item is correct */ + if (getCurrentContentItem().getValueType() != valueType) + { + DCMSR_CMR_WARN("Cannot replace value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ") ... wrong value type"); + result = SR_EC_InvalidContentItem; + } + else if (getCurrentContentItem().getConceptName() != conceptName) + { + DCMSR_CMR_WARN("Cannot replace value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ") ... wrong concept name"); + result = SR_EC_InvalidConceptName; + } else { + DCMSR_CMR_DEBUG("Replacing value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ")"); + /* the actual replacing of the value is done by the caller of this method */ + } + } else + result = SR_EC_InvalidTemplateStructure; + /* finally, set annotation */ + CHECK_RESULT(getCurrentContentItem().setAnnotationText(annotationText)); + } else + result = SR_EC_InvalidConceptName; + return result; +} + + +// explicit template instantiation (needed for use in TID 1500) +template class TID1501_MeasurementGroup; diff --git a/dcmsr/libcmr/tid15def.cc b/dcmsr/libcmr/tid15def.cc new file mode 100644 index 00000000..7a4fe511 --- /dev/null +++ b/dcmsr/libcmr/tid15def.cc @@ -0,0 +1,24 @@ +/* + * + * Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Source file for common error constants used in TID 14xx/15xx + * + * Author: Joerg Riesmeier + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/cmr/tid15def.h" +#include "dcmtk/dcmdata/dcerror.h" + + +// conditions constants +makeOFConditionConst(CMR_EC_NoMeasurementReport, OFM_dcmsr, 1500, OF_error, "No Measurement Report"); +makeOFConditionConst(CMR_EC_NoMeasurementGroup, OFM_dcmsr, 1501, OF_error, "No Measurement Group"); +makeOFConditionConst(CMR_EC_NoMeasurement, OFM_dcmsr, 1502, OF_error, "No Measurement"); +makeOFConditionConst(CMR_EC_InvalidSegmentationObject, OFM_dcmsr, 1503, OF_error, "Invalid Segmentation Object"); +makeOFConditionConst(CMR_EC_InvalidRealWorldValueMappingObject, OFM_dcmsr, 1504, OF_error, "Invalid Real World Value Mapping Object"); diff --git a/dcmsr/libcmr/tid1600.cc b/dcmsr/libcmr/tid1600.cc index ed4ecb50..58a059ff 100644 --- a/dcmsr/libcmr/tid1600.cc +++ b/dcmsr/libcmr/tid1600.cc @@ -38,30 +38,34 @@ #define IMAGE_LIBRARY 0 #define LAST_IMAGE_LIBRARY_GROUP 1 #define LAST_IMAGE_LIBRARY_ENTRY 2 +#define NUMBER_OF_LIST_ENTRIES 3 // general information on TID 1600 (Image Library) #define TEMPLATE_NUMBER "1600" #define MAPPING_RESOURCE "DCMR" #define MAPPING_RESOURCE_UID UID_DICOMContentMappingResource -#define TEMPLATE_TYPE OFTrue /* extensible */ +#define TEMPLATE_TYPE OFTrue /* extensible */ +#define TEMPLATE_ORDER OFFalse /* non-significant */ // conditions constants makeOFConditionConst(CMR_EC_NoImageLibrary, OFM_dcmsr, 1600, OF_error, "No Image Library"); makeOFConditionConst(CMR_EC_NoImageLibraryGroup, OFM_dcmsr, 1601, OF_error, "No Image Library Group"); makeOFConditionConst(CMR_EC_NoImageLibraryEntry, OFM_dcmsr, 1602, OF_error, "No Image Library Entry"); -makeOFConditionConst(CMR_EC_CannotAddMultipleImageLibraryEntryDescriptors, OFM_dcmsr, 1603, OF_error, "Cannot add multiple Image Library Entry Descriptors"); +makeOFConditionConst(CMR_EC_CannotAddMultipleImageLibraryGroupDescriptors, OFM_dcmsr, 1603, OF_error, "Cannot add multiple Image Library Group Descriptors"); makeOFConditionConst(CMR_EC_MissingImageLibraryEntryDescriptorModality, OFM_dcmsr, 1604, OF_error, "Missing Image Library Entry Descriptor 'Modality'"); makeOFConditionConst(CMR_EC_WrongImageLibraryEntryDescriptorModality, OFM_dcmsr, 1605, OF_error, "Wrong Image Library Entry Descriptor 'Modality'"); makeOFConditionConst(CMR_EC_NoImageLibraryEntryDescriptorsToBeAdded, OFM_dcmsr, 1606, OF_ok, "No Image Library Entry Descriptors to be added"); +makeOFConditionConst(CMR_EC_NoImageLibraryEntryDescriptorsToBeMoved, OFM_dcmsr, 1607, OF_ok, "No Image Library Entry Descriptors to be moved"); TID1600_ImageLibrary::TID1600_ImageLibrary(const OFBool createLibrary) : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID) { setExtensible(TEMPLATE_TYPE); - /* need to store image library, last image library group and entry */ - reserveEntriesInNodeList(3); + setOrderSignificant(TEMPLATE_ORDER); + /* need to store position of various content items */ + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES); /* TID 1600 (Image Library) Row 1 */ if (createLibrary) createImageLibrary(); @@ -132,6 +136,7 @@ OFCondition TID1600_ImageLibrary::addImageGroup() OFCondition TID1600_ImageLibrary::addImageEntry(DcmItem &dataset, const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = CMR_EC_NoImageLibraryGroup; @@ -150,14 +155,14 @@ OFCondition TID1600_ImageLibrary::addImageEntry(DcmItem &dataset, CHECK_RESULT(tid1601->getCurrentContentItem().setAnnotationText("TID 1601 - Row 1")); const size_t lastNode = tid1601->getNodeID(); /* TID 1601 (Image Library Entry) Row 2 */ - if (mode == withAllDescriptors) + if (anyDescriptorsToBeAdded(mode, descriptors)) { /* create a new subtree for TID 1602 (Image Library Entry Descriptors) */ DSRDocumentSubTree *tid1602 = new DSRDocumentSubTree; if (tid1602 != NULL) { /* call the function doing the real work */ - STORE_RESULT(addImageEntryDescriptors(*tid1602, dataset, check)); + STORE_RESULT(addImageEntryDescriptors(*tid1602, dataset, mode, descriptors, check)); /* if everything was OK, insert new subtree into the template */ if (result.good() && !tid1602->isEmpty()) { @@ -205,48 +210,57 @@ OFCondition TID1600_ImageLibrary::addImageEntry(DcmItem &dataset, } -OFCondition TID1600_ImageLibrary::addImageEntryDescriptors(DcmItem &dataset, +OFCondition TID1600_ImageLibrary::addImageGroupDescriptors(DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = CMR_EC_NoImageLibraryGroup; /* check whether image library group exists */ if (hasImageLibraryGroup()) { - /* create a new subtree in order to "rollback" in case of error */ - DSRDocumentSubTree *subTree = new DSRDocumentSubTree; - if (subTree != NULL) + /* check whether there are any descriptors to be added (at all) */ + if (anyDescriptorsToBeAdded(mode, descriptors)) { - /* call the function doing the real work */ - STORE_RESULT(addImageEntryDescriptors(*subTree, dataset, check)); - /* if everything was OK, insert new subtree into the template */ - if (result.good() && !subTree->isEmpty()) + /* create a new subtree in order to "rollback" in case of error */ + DSRDocumentSubTree *subTree = new DSRDocumentSubTree; + if (subTree != NULL) { - /* go to last image library group (if any) */ - if (gotoEntryFromNodeList(this, LAST_IMAGE_LIBRARY_GROUP) > 0) + /* call the function doing the real work */ + STORE_RESULT(addImageEntryDescriptors(*subTree, dataset, mode, descriptors, check)); + /* if everything was OK, insert new subtree into the template */ + if (result.good() && !subTree->isEmpty()) { - /* check whether TID 1600 (Image Library) Row 3 is already there */ - const DSRDocumentTreeNode *childNode = getChildNode(); - if ((childNode != NULL) && (childNode->getRelationshipType() == RT_hasAcqContext)) + /* go to last image library group (if any) */ + if (gotoEntryFromNodeList(this, LAST_IMAGE_LIBRARY_GROUP) > 0) { - /* only a single invocation of the included template allowed */ - result = CMR_EC_CannotAddMultipleImageLibraryEntryDescriptors; + /* check whether TID 1600 (Image Library) Row 3 is already there */ + const DSRDocumentTreeNode *childNode = getChildNode(); + if ((childNode != NULL) && (childNode->getRelationshipType() == RT_hasAcqContext)) + { + /* only a single invocation of the included template allowed */ + result = CMR_EC_CannotAddMultipleImageLibraryGroupDescriptors; + } else { + /* insert subtree at current position */ + STORE_RESULT(insertSubTree(subTree, AM_belowCurrentBeforeFirstChild)); + } } else { - /* insert subtree at current position */ - STORE_RESULT(insertSubTree(subTree, AM_belowCurrentBeforeFirstChild)); + /* should never happen but ... */ + result = CMR_EC_NoImageLibraryGroup; } + /* in case of error, make sure that memory is freed */ + BAD_RESULT(delete subTree); } else { - /* should never happen but ... */ - result = CMR_EC_NoImageLibraryGroup; + CHECK_RESULT(CMR_EC_NoImageLibraryEntryDescriptorsToBeAdded); + /* delete the new subtree since it has not been inserted */ + delete subTree; } - /* in case of error, make sure that memory is freed */ - BAD_RESULT(delete subTree); - } else { - CHECK_RESULT(CMR_EC_NoImageLibraryEntryDescriptorsToBeAdded); - /* delete the new subtree since it has not been inserted */ - delete subTree; - } - } else - result = EC_MemoryExhausted; + } else + result = EC_MemoryExhausted; + } else { + /* the combination of 'mode' and 'descriptors' parameter makes no sense */ + result = EC_IllegalParameter; + } } return result; } @@ -272,6 +286,125 @@ OFCondition TID1600_ImageLibrary::getImageEntryModality(DSRCodedEntryValue &moda } +OFCondition TID1600_ImageLibrary::moveCommonImageDescriptorsToImageGroups() +{ + OFCondition result = CMR_EC_NoImageLibrary; + /* go to image library (root node) */ + DSRDocumentTreeNodeCursor groupCursor(getRoot()); + if (groupCursor.isValid()) + { + DCMSR_CMR_DEBUG("Moving common image descriptors to image library groups (TID 1600)"); + /* counter for moved image descriptors and image groups */ + size_t movedDescriptors = 0; + size_t groupCounter = 0; + const DSRDocumentTreeNodeConceptNameFilter groupFilter(CODE_DCM_ImageLibraryGroup); + /* go to the first child (if any) and check for image library group */ + if (groupCursor.gotoChild() && groupCursor.gotoMatchingNode(groupFilter, OFFalse /*searchIntoSub*/)) + { + result = EC_Normal; + /* iterate over all image library groups */ + do { + ++groupCounter; + DSRDocumentTreeNodeCursor imageCursor(groupCursor); + const DSRDocumentTreeNodeValueTypeFilter imageFilter(VT_Image); + /* go to the first child (if any) and check for image library entry */ + if (imageCursor.gotoChild() && imageCursor.gotoMatchingNode(imageFilter, OFFalse /*searchIntoSub*/)) + { + DSRDocumentSubTree *subTree = NULL; + /* iterate over all image library entries */ + do { + DSRDocumentTreeNodeCursor childCursor(imageCursor); + if (childCursor.gotoChild()) + { + if (subTree != NULL) + { + size_t nodeID = subTree->gotoRoot(); + /* check whether there are any common descriptors */ + if (nodeID > 0) + { + while (nodeID > 0) + { + DSRDocumentTreeNodeCursor cursor(childCursor); + /* if not found, remove it from the list */ + if (!cursor.gotoNode(*subTree->getCurrentNode())) + nodeID = subTree->removeCurrentContentItem(); + else + nodeID = subTree->gotoNext(); + } + } else { + /* nothing to compare, so exit the loop */ + break; + } + } else { + /* create a copy of the subtree (starting from the first child) */ + subTree = DSRDocumentSubTree::cloneSubTree(childCursor, imageCursor.getNodeID()); + } + } else { + /* no image descriptors for this entry, so clear the list and exit the loop */ + if (subTree != NULL) + subTree->clear(); + break; + } + } while (imageCursor.gotoNextMatchingNode(imageFilter, OFFalse /*searchIntoSub*/)); + /* if there are any common descriptors ... */ + if (subTree != NULL) + { + DCMSR_CMR_DEBUG(" Found " << subTree->countNodes() << " common image descriptors in image library group #" << groupCounter); + if (!subTree->isEmpty()) + { + const DSRDocumentTreeNodeCursor oldCursor(getCursor()); + /* remove them from the respective image library entries */ + imageCursor = groupCursor; + if (imageCursor.gotoChild() && imageCursor.gotoMatchingNode(imageFilter, OFFalse /*searchIntoSub*/)) + { + /* iterate over all image library entries */ + do { + if (subTree->gotoRoot()) + { + do { + /* go to the matching node (if any) */ + setCursor(imageCursor); + if (gotoChild()) + { + if (gotoNode(*subTree->getCurrentNode(), OFFalse /*startFromRoot*/)) + { + /* and remove it from the tree */ + removeCurrentContentItem(); + ++movedDescriptors; + } + } else { + /* nothing to compare, so exit the loop */ + break; + } + } while (subTree->gotoNext()); + } + } while (imageCursor.gotoNextMatchingNode(imageFilter, OFFalse /*searchIntoSub*/)); + } + /* and, finally, insert common descriptors to image library group */ + setCursor(groupCursor); + STORE_RESULT(insertSubTree(subTree, AM_belowCurrentBeforeFirstChild, RT_unknown /*defaultRelType*/, OFTrue /*deleteIfFail*/)); + /* reset cursor (to old position) */ + setCursor(oldCursor); + } else { + /* free memory */ + delete subTree; + } + } else + DCMSR_CMR_DEBUG(" No descriptors on image level, skipping image library group #" << groupCounter); + } + } while (result.good() && groupCursor.gotoNextMatchingNode(groupFilter, OFFalse /*searchIntoSub*/)); + /* check whether any descriptors have been moved */ + if (movedDescriptors > 0) + DCMSR_CMR_DEBUG("Moved a total of " << movedDescriptors << " image descriptors to image group level"); + else + result = CMR_EC_NoImageLibraryEntryDescriptorsToBeMoved; + } else + result = CMR_EC_NoImageLibraryGroup; + } + return result; +} + + // set methods OFCondition TID1600_ImageLibrary::setPETImageRadionuclide(const CID4020_PETRadionuclide &radionuclide, @@ -383,6 +516,8 @@ OFCondition TID1600_ImageLibrary::createImageLibrary() OFCondition TID1600_ImageLibrary::addImageEntryDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = EC_Normal; @@ -390,80 +525,98 @@ OFCondition TID1600_ImageLibrary::addImageEntryDescriptors(DSRDocumentSubTree &t OFString modality; if (getStringValueFromDataset(dataset, DCM_Modality, modality).good() && !modality.empty()) { - /* determine modality code from CID 29 */ - const CID29e_AcquisitionModality contextGroup; - DSRCodedEntryValue modalityCode(contextGroup.mapModality(modality)); - if (modalityCode.isComplete()) + /* check whether descriptor should be added */ + if (checkDescriptorToBeAdded(CODE_DCM_Modality, mode, descriptors)) { - CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_Modality, check)); - CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(modalityCode, check)); - CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1602 - Row 1")); - } else { - /* do not treat this as an error, just report a warning */ - DCMSR_CMR_WARN("Cannot map Modality '" << modality << "' to a coded entry (not in CID 29)"); + /* determine modality code from CID 29 */ + DSRCodedEntryValue modalityCode; + const CID29e_AcquisitionModality contextGroup; + if (contextGroup.mapModality(modality, modalityCode).good()) + { + CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_Modality, check)); + CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(modalityCode, check)); + CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1602 - Row 1")); + } else { + /* do not treat this as an error, just report a warning */ + DCMSR_CMR_WARN("Cannot map Modality '" << modality << "' to a coded entry (not in CID 29)"); + } } } /* TID 1602 (Image Library Entry Descriptors) Row 2 */ - DSRCodedEntryValue regionCode; - /* try to get coded entry from code sequence */ - if (regionCode.readSequence(dataset, DCM_AnatomicRegionSequence, "3" /*type*/).bad()) + if (checkDescriptorToBeAdded(CODE_DCM_TargetRegion, mode, descriptors)) { - OFString bodyPartExamined; - if (getStringValueFromDataset(dataset, DCM_BodyPartExamined, bodyPartExamined).good() && !bodyPartExamined.empty()) + DSRCodedEntryValue regionCode; + /* try to get coded entry from code sequence */ + if (regionCode.readSequence(dataset, DCM_AnatomicRegionSequence, "3" /*type*/).bad()) { - /* alternatively, determine target region code from CID 4031 (using PS 3.16 Annex L) */ - regionCode = CID4031e_CommonAnatomicRegions::mapBodyPartExamined(bodyPartExamined); - if (!regionCode.isComplete()) + OFString bodyPartExamined; + if (getStringValueFromDataset(dataset, DCM_BodyPartExamined, bodyPartExamined).good() && !bodyPartExamined.empty()) { - /* report this as a debug message (avoid too many warnings) */ - DCMSR_CMR_DEBUG("Cannot map Body Part Examined '" << bodyPartExamined << "' to a coded entry (no mapping to CID 4031 defined)"); + /* alternatively, determine target region code from CID 4031 (using PS 3.16 Annex L) */ + if (CID4031e_CommonAnatomicRegions::mapBodyPartExamined(bodyPartExamined, regionCode).bad()) + { + /* report this as a debug message (avoid too many warnings) */ + DCMSR_CMR_DEBUG("Cannot map Body Part Examined '" << bodyPartExamined << "' to a coded entry (no mapping to CID 4031 defined)"); + } } } - } - if (regionCode.isComplete()) - { - CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_TargetRegion, check)); - CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(regionCode, check)); - CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1602 - Row 2")); + if (regionCode.isComplete()) + { + CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_TargetRegion, check)); + CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(regionCode, check)); + CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1602 - Row 2")); + } } /* TID 1602 (Image Library Entry Descriptors) Row 3 */ - OFString imageLaterality; - if (getStringValueFromDataset(dataset, DCM_ImageLaterality, imageLaterality).good() && !imageLaterality.empty()) + if (checkDescriptorToBeAdded(CODE_DCM_ImageLaterality, mode, descriptors)) { - /* determine image laterality code from CID 244 */ - DSRCodedEntryValue lateralityCode(CID244e_Laterality::mapImageLaterality(imageLaterality)); - if (lateralityCode.isComplete()) + OFString imageLaterality; + if (getStringValueFromDataset(dataset, DCM_ImageLaterality, imageLaterality).good() && !imageLaterality.empty()) { - CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_ImageLaterality, check)); - CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(lateralityCode, check)); - CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1602 - Row 3")); - } else { - /* do not treat this as an error, just report a warning */ - DCMSR_CMR_WARN("Cannot map Image Laterality '" << imageLaterality << "' to a coded entry (not in CID 244)"); + /* determine image laterality code from CID 244 */ + DSRCodedEntryValue lateralityCode; + if (CID244e_Laterality::mapImageLaterality(imageLaterality, lateralityCode).good()) + { + CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_ImageLaterality, check)); + CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(lateralityCode, check)); + CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1602 - Row 3")); + } else { + /* do not treat this as an error, just report a warning */ + DCMSR_CMR_WARN("Cannot map Image Laterality '" << imageLaterality << "' to a coded entry (not in CID 244)"); + } } } /* TID 1602 (Image Library Entry Descriptors) Row 4 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_StudyDate, 0 /*pos*/, VT_Date, CODE_DCM_StudyDate, "TID 1602 - Row 4", check)); + if (checkDescriptorToBeAdded(CODE_DCM_StudyDate, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_StudyDate, 0 /*pos*/, VT_Date, CODE_DCM_StudyDate, "TID 1602 - Row 4", check)); /* TID 1602 (Image Library Entry Descriptors) Row 5 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_StudyTime, 0 /*pos*/, VT_Time, CODE_DCM_StudyTime, "TID 1602 - Row 5", check)); + if (checkDescriptorToBeAdded(CODE_DCM_StudyTime, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_StudyTime, 0 /*pos*/, VT_Time, CODE_DCM_StudyTime, "TID 1602 - Row 5", check)); /* TID 1602 (Image Library Entry Descriptors) Row 6 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_ContentDate, 0 /*pos*/, VT_Date, CODE_DCM_ContentDate, "TID 1602 - Row 6", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ContentDate, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_ContentDate, 0 /*pos*/, VT_Date, CODE_DCM_ContentDate, "TID 1602 - Row 6", check)); /* TID 1602 (Image Library Entry Descriptors) Row 7 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_ContentTime, 0 /*pos*/, VT_Time, CODE_DCM_ContentTime, "TID 1602 - Row 7", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ContentTime, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_ContentTime, 0 /*pos*/, VT_Time, CODE_DCM_ContentTime, "TID 1602 - Row 7", check)); /* TID 1602 (Image Library Entry Descriptors) Row 8 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_AcquisitionDate, 0 /*pos*/, VT_Date, CODE_DCM_AcquisitionDate, "TID 1602 - Row 8", check)); + if (checkDescriptorToBeAdded(CODE_DCM_AcquisitionDate, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_AcquisitionDate, 0 /*pos*/, VT_Date, CODE_DCM_AcquisitionDate, "TID 1602 - Row 8", check)); /* TID 1602 (Image Library Entry Descriptors) Row 9 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_AcquisitionTime, 0 /*pos*/, VT_Time, CODE_DCM_AcquisitionTime, "TID 1602 - Row 9", check)); + if (checkDescriptorToBeAdded(CODE_DCM_AcquisitionTime, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_AcquisitionTime, 0 /*pos*/, VT_Time, CODE_DCM_AcquisitionTime, "TID 1602 - Row 9", check)); /* TID 1602 (Image Library Entry Descriptors) Row 10 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_FrameOfReferenceUID, 0 /*pos*/, VT_UIDRef, CODE_DCM_FrameOfReferenceUID, "TID 1602 - Row 10", check)); + if (checkDescriptorToBeAdded(CODE_DCM_FrameOfReferenceUID, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_FrameOfReferenceUID, 0 /*pos*/, VT_UIDRef, CODE_DCM_FrameOfReferenceUID, "TID 1602 - Row 10", check)); /* TID 1602 (Image Library Entry Descriptors) Row 11 */ /* - tbc: what about DCM_TotalPixelMatrixRows (e.g. used for WSI images)? */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_Rows, 0 /*pos*/, CODE_DCM_PixelDataRows, CODE_UCUM_Pixels, "TID 1602 - Row 11", check)); + if (checkDescriptorToBeAdded(CODE_DCM_PixelDataRows, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_Rows, 0 /*pos*/, CODE_DCM_PixelDataRows, CODE_UCUM_Pixels, "TID 1602 - Row 11", check)); /* TID 1602 (Image Library Entry Descriptors) Row 12 */ /* - tbc: what about DCM_TotalPixelMatrixColumns (e.g. used for WSI images)? */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_Columns, 0 /*pos*/, CODE_DCM_PixelDataColumns, CODE_UCUM_Pixels, "TID 1602 - Row 12", check)); + if (checkDescriptorToBeAdded(CODE_DCM_PixelDataColumns, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_Columns, 0 /*pos*/, CODE_DCM_PixelDataColumns, CODE_UCUM_Pixels, "TID 1602 - Row 12", check)); /* continue with modality-specific descriptors (TID 1603 to 1607) */ - CHECK_RESULT(addModalitySpecificDescriptors(tree, dataset, modality, check)); + CHECK_RESULT(addModalitySpecificDescriptors(tree, dataset, modality, mode, descriptors, check)); return result; } @@ -471,163 +624,200 @@ OFCondition TID1600_ImageLibrary::addImageEntryDescriptors(DSRDocumentSubTree &t OFCondition TID1600_ImageLibrary::addModalitySpecificDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, const OFString &modality, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = EC_Normal; /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) */ if ((modality == "CR") || (modality == "RG") || (modality == "DX") || (modality == "MG") || (modality == "XA") || (modality == "RF") || (modality == "PX") || (modality == "IO")) - CHECK_RESULT(addProjectionRadiographyDescriptors(tree, dataset, check)); + CHECK_RESULT(addProjectionRadiographyDescriptors(tree, dataset, mode, descriptors, check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) */ if ((modality == "CT") || (modality == "MR") || (modality == "US") /* correct? */ || (modality == "PT") || (modality == "OCT") || (modality == "OPT") || (modality == "IVOCT")) - CHECK_RESULT(addCrossSectionalModalitiesDescriptors(tree, dataset, check)); + CHECK_RESULT(addCrossSectionalModalitiesDescriptors(tree, dataset, mode, descriptors, check)); /* TID 1605 (Image Library Entry Descriptors for CT) */ if (modality == "CT") - CHECK_RESULT(addComputedTomographyDescriptors(tree, dataset, check)); + CHECK_RESULT(addComputedTomographyDescriptors(tree, dataset, mode, descriptors, check)); /* TID 1606 (Image Library Entry Descriptors for MR) */ if (modality == "MR") - CHECK_RESULT(addMagneticResonanceDescriptors(tree, dataset, check)); + CHECK_RESULT(addMagneticResonanceDescriptors(tree, dataset, mode, descriptors, check)); /* TID 1607 (Image Library Entry Descriptors for PET) */ if (modality == "PT") - CHECK_RESULT(addPositronEmissionTomographyDescriptors(tree, dataset, check)); + CHECK_RESULT(addPositronEmissionTomographyDescriptors(tree, dataset, mode, descriptors, check)); return result; } OFCondition TID1600_ImageLibrary::addProjectionRadiographyDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = EC_Normal; /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) Row 1 */ - CHECK_RESULT(addCodeContentItemFromDataset(tree, dataset, DCM_ViewCodeSequence, CODE_DCM_ImageView, "TID 1603 - Row 1", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImageView, mode, descriptors)) + CHECK_RESULT(addCodeContentItemFromDataset(tree, dataset, DCM_ViewCodeSequence, CODE_DCM_ImageView, "TID 1603 - Row 1", check)); /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) Row 2 */ - if (result.good() && (tree.getCurrentContentItem().getConceptName() == CODE_DCM_ImageView)) + if (checkDescriptorToBeAdded(CODE_DCM_ImageViewModifier, mode, descriptors)) { - DcmItem *item = NULL; - /* get view modifiers (if any) */ - if (dataset.findAndGetSequenceItem(DCM_ViewCodeSequence, item, 0 /*itemNum*/).good()) + if (result.good() && (tree.getCurrentContentItem().getConceptName() == CODE_DCM_ImageView)) { - DcmSequenceOfItems *sequence = NULL; - if (item->findAndGetSequence(DCM_ViewModifierCodeSequence, sequence).good()) + DcmItem *item = NULL; + /* get view modifiers (if any) */ + if (dataset.findAndGetSequenceItem(DCM_ViewCodeSequence, item, 0 /*itemNum*/).good()) { - /* iterate over all sequence items */ - DcmObject *object = NULL; - while (((object = sequence->nextInContainer(object)) != NULL) && result.good()) + DcmSequenceOfItems *sequence = NULL; + if (item->findAndGetSequence(DCM_ViewModifierCodeSequence, sequence).good()) { - DSRCodedEntryValue modifierCode; - if (modifierCode.readSequenceItem(*OFstatic_cast(DcmItem *, object), DCM_ViewModifierCodeSequence).good()) + /* iterate over all sequence items */ + DcmObject *object = NULL; + while (((object = sequence->nextInContainer(object)) != NULL) && result.good()) { - CHECK_RESULT(tree.addChildContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_ImageViewModifier, check)); - CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(modifierCode, check)); - CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1603 - Row 2")); - tree.goUp(); + DSRCodedEntryValue modifierCode; + if (modifierCode.readSequenceItem(*OFstatic_cast(DcmItem *, object), DCM_ViewModifierCodeSequence).good()) + { + CHECK_RESULT(tree.addChildContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_ImageViewModifier, check)); + CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(modifierCode, check)); + CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1603 - Row 2")); + tree.goUp(); + } } } } } } /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) Row 3 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_PatientOrientation, 0 /*pos*/, VT_Text, CODE_DCM_PatientOrientationRow, "TID 1603 - Row 3", check)); + if (checkDescriptorToBeAdded(CODE_DCM_PatientOrientationRow, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_PatientOrientation, 0 /*pos*/, VT_Text, CODE_DCM_PatientOrientationRow, "TID 1603 - Row 3", check)); /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) Row 4 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_PatientOrientation, 1 /*pos*/, VT_Text, CODE_DCM_PatientOrientationColumn, "TID 1603 - Row 4", check)); + if (checkDescriptorToBeAdded(CODE_DCM_PatientOrientationColumn, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, dataset, DCM_PatientOrientation, 1 /*pos*/, VT_Text, CODE_DCM_PatientOrientationColumn, "TID 1603 - Row 4", check)); /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) Row 5 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagerPixelSpacing, 1 /*pos*/, CODE_DCM_HorizontalPixelSpacing, CODE_UCUM_Millimeter, "TID 1603 - Row 5", check)); + if (checkDescriptorToBeAdded(CODE_DCM_HorizontalPixelSpacing, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagerPixelSpacing, 1 /*pos*/, CODE_DCM_HorizontalPixelSpacing, CODE_UCUM_Millimeter, "TID 1603 - Row 5", check)); /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) Row 6 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagerPixelSpacing, 0 /*pos*/, CODE_DCM_VerticalPixelSpacing, CODE_UCUM_Millimeter, "TID 1603 - Row 6", check)); + if (checkDescriptorToBeAdded(CODE_DCM_VerticalPixelSpacing, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagerPixelSpacing, 0 /*pos*/, CODE_DCM_VerticalPixelSpacing, CODE_UCUM_Millimeter, "TID 1603 - Row 6", check)); /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) Row 7 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_PositionerPrimaryAngle, 0 /*pos*/, CODE_DCM_PositionerPrimaryAngle, CODE_UCUM_Degrees, "TID 1603 - Row 7", check)); + if (checkDescriptorToBeAdded(CODE_DCM_PositionerPrimaryAngle, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_PositionerPrimaryAngle, 0 /*pos*/, CODE_DCM_PositionerPrimaryAngle, CODE_UCUM_Degrees, "TID 1603 - Row 7", check)); /* TID 1603 (Image Library Entry Descriptors for Projection Radiography) Row 8 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_PositionerSecondaryAngle, 0 /*pos*/, CODE_DCM_PositionerSecondaryAngle, CODE_UCUM_Degrees, "TID 1603 - Row 8", check)); + if (checkDescriptorToBeAdded(CODE_DCM_PositionerSecondaryAngle, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_PositionerSecondaryAngle, 0 /*pos*/, CODE_DCM_PositionerSecondaryAngle, CODE_UCUM_Degrees, "TID 1603 - Row 8", check)); return result; } OFCondition TID1600_ImageLibrary::addCrossSectionalModalitiesDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = EC_Normal; /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 1 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_PixelSpacing, 1 /*pos*/, CODE_DCM_HorizontalPixelSpacing, CODE_UCUM_Millimeter, "TID 1604 - Row 1", check)); + if (checkDescriptorToBeAdded(CODE_DCM_HorizontalPixelSpacing, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_PixelSpacing, 1 /*pos*/, CODE_DCM_HorizontalPixelSpacing, CODE_UCUM_Millimeter, "TID 1604 - Row 1", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 2 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_PixelSpacing, 0 /*pos*/, CODE_DCM_VerticalPixelSpacing, CODE_UCUM_Millimeter, "TID 1604 - Row 2", check)); + if (checkDescriptorToBeAdded(CODE_DCM_VerticalPixelSpacing, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_PixelSpacing, 0 /*pos*/, CODE_DCM_VerticalPixelSpacing, CODE_UCUM_Millimeter, "TID 1604 - Row 2", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 3 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_SpacingBetweenSlices, 0 /*pos*/, CODE_DCM_SpacingBetweenSlices, CODE_UCUM_Millimeter, "TID 1604 - Row 3", check)); + if (checkDescriptorToBeAdded(CODE_DCM_SpacingBetweenSlices, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_SpacingBetweenSlices, 0 /*pos*/, CODE_DCM_SpacingBetweenSlices, CODE_UCUM_Millimeter, "TID 1604 - Row 3", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 4 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_SliceThickness, 0 /*pos*/, CODE_DCM_SliceThickness, CODE_UCUM_Millimeter, "TID 1604 - Row 4", check)); + if (checkDescriptorToBeAdded(CODE_DCM_SliceThickness, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_SliceThickness, 0 /*pos*/, CODE_DCM_SliceThickness, CODE_UCUM_Millimeter, "TID 1604 - Row 4", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 5 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagePositionPatient, 0 /*pos*/, CODE_DCM_ImagePosition_Patient_X, CODE_UCUM_Millimeter, "TID 1604 - Row 5", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImagePosition_Patient_X, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagePositionPatient, 0 /*pos*/, CODE_DCM_ImagePosition_Patient_X, CODE_UCUM_Millimeter, "TID 1604 - Row 5", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 6 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagePositionPatient, 1 /*pos*/, CODE_DCM_ImagePosition_Patient_Y, CODE_UCUM_Millimeter, "TID 1604 - Row 6", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImagePosition_Patient_Y, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagePositionPatient, 1 /*pos*/, CODE_DCM_ImagePosition_Patient_Y, CODE_UCUM_Millimeter, "TID 1604 - Row 6", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 7 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagePositionPatient, 2 /*pos*/, CODE_DCM_ImagePosition_Patient_Z, CODE_UCUM_Millimeter, "TID 1604 - Row 7", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImagePosition_Patient_Z, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImagePositionPatient, 2 /*pos*/, CODE_DCM_ImagePosition_Patient_Z, CODE_UCUM_Millimeter, "TID 1604 - Row 7", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 8 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 0 /*pos*/, CODE_DCM_ImageOrientation_Patient_RowX, CODE_UCUM_Minus1To1, "TID 1604 - Row 8", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImageOrientation_Patient_RowX, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 0 /*pos*/, CODE_DCM_ImageOrientation_Patient_RowX, CODE_UCUM_Minus1To1, "TID 1604 - Row 8", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 9 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 1 /*pos*/, CODE_DCM_ImageOrientation_Patient_RowY, CODE_UCUM_Minus1To1, "TID 1604 - Row 9", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImageOrientation_Patient_RowY, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 1 /*pos*/, CODE_DCM_ImageOrientation_Patient_RowY, CODE_UCUM_Minus1To1, "TID 1604 - Row 9", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 10 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 2 /*pos*/, CODE_DCM_ImageOrientation_Patient_RowZ, CODE_UCUM_Minus1To1, "TID 1604 - Row 10", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImageOrientation_Patient_RowZ, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 2 /*pos*/, CODE_DCM_ImageOrientation_Patient_RowZ, CODE_UCUM_Minus1To1, "TID 1604 - Row 10", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 11 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 3 /*pos*/, CODE_DCM_ImageOrientation_Patient_ColumnX, CODE_UCUM_Minus1To1, "TID 1604 - Row 11", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImageOrientation_Patient_ColumnX, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 3 /*pos*/, CODE_DCM_ImageOrientation_Patient_ColumnX, CODE_UCUM_Minus1To1, "TID 1604 - Row 11", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 12 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 4 /*pos*/, CODE_DCM_ImageOrientation_Patient_ColumnY, CODE_UCUM_Minus1To1, "TID 1604 - Row 12", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImageOrientation_Patient_ColumnY, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 4 /*pos*/, CODE_DCM_ImageOrientation_Patient_ColumnY, CODE_UCUM_Minus1To1, "TID 1604 - Row 12", check)); /* TID 1604 (Image Library Entry Descriptors for Cross-Sectional Modalities) Row 13 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 5 /*pos*/, CODE_DCM_ImageOrientation_Patient_ColumnZ, CODE_UCUM_Minus1To1, "TID 1604 - Row 13", check)); + if (checkDescriptorToBeAdded(CODE_DCM_ImageOrientation_Patient_ColumnZ, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, dataset, DCM_ImageOrientationPatient, 5 /*pos*/, CODE_DCM_ImageOrientation_Patient_ColumnZ, CODE_UCUM_Minus1To1, "TID 1604 - Row 13", check)); return result; } OFCondition TID1600_ImageLibrary::addComputedTomographyDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = EC_Normal; /* TID 1605 (Image Library Entry Descriptors for CT) Row 1 */ - DcmSequenceOfItems *ctAcquisitionTypeSequence = NULL; - /* - tbd: only check in functional groups sequences? might use "dcmfg" for this purpose */ - if (dataset.findAndGetSequence(DCM_CTAcquisitionTypeSequence, ctAcquisitionTypeSequence, OFTrue /*searchIntoSub*/).good()) + if (checkDescriptorToBeAdded(CODE_DCM_CTAcquisitionType, mode, descriptors)) { - DcmItem *item = ctAcquisitionTypeSequence->getItem(0); - if (item != NULL) + DcmSequenceOfItems *ctAcquisitionTypeSequence = NULL; + /* - tbd: only check in functional groups sequences? might use "dcmfg" for this purpose */ + if (dataset.findAndGetSequence(DCM_CTAcquisitionTypeSequence, ctAcquisitionTypeSequence, OFTrue /*searchIntoSub*/).good()) { - OFString acquisitionType; - if (getStringValueFromDataset(*item, DCM_AcquisitionType, acquisitionType).good() && !acquisitionType.empty()) + DcmItem *item = ctAcquisitionTypeSequence->getItem(0); + if (item != NULL) { - /* determine CT acquisition type code from CID 10013 */ - DSRCodedEntryValue acquisitionTypeCode(CID10013e_CTAcquisitionType::mapAcquisitionType(acquisitionType)); - if (acquisitionTypeCode.isComplete()) + OFString acquisitionType; + if (getStringValueFromDataset(*item, DCM_AcquisitionType, acquisitionType).good() && !acquisitionType.empty()) { - CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_CTAcquisitionType, check)); - CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(acquisitionTypeCode, check)); - CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1605 - Row 1")); - } else { - /* do not treat this as an error, just report a warning */ - DCMSR_CMR_WARN("Cannot map Acquisition Type '" << acquisitionType << "' to a coded entry (not in CID 10013)"); + /* determine CT acquisition type code from CID 10013 */ + DSRCodedEntryValue acquisitionTypeCode; + if (CID10013e_CTAcquisitionType::mapAcquisitionType(acquisitionType, acquisitionTypeCode).good()) + { + CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_CTAcquisitionType, check)); + CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(acquisitionTypeCode, check)); + CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1605 - Row 1")); + } else { + /* do not treat this as an error, just report a warning */ + DCMSR_CMR_WARN("Cannot map Acquisition Type '" << acquisitionType << "' to a coded entry (not in CID 10013)"); + } } } } } /* TID 1605 (Image Library Entry Descriptors for CT) Row 2 */ - DcmSequenceOfItems *ctReconstructionSequence = NULL; - /* - tbd: only check in functional groups sequences? might use "dcmfg" for this purpose */ - if (dataset.findAndGetSequence(DCM_CTReconstructionSequence, ctReconstructionSequence, OFTrue /*searchIntoSub*/).good()) + if (checkDescriptorToBeAdded(CODE_DCM_ReconstructionAlgorithm, mode, descriptors)) { - DcmItem *item = ctReconstructionSequence->getItem(0); - if (item != NULL) + DcmSequenceOfItems *ctReconstructionSequence = NULL; + /* - tbd: only check in functional groups sequences? might use "dcmfg" for this purpose */ + if (dataset.findAndGetSequence(DCM_CTReconstructionSequence, ctReconstructionSequence, OFTrue /*searchIntoSub*/).good()) { - OFString reconstructionAlgorithm; - if (getStringValueFromDataset(*item, DCM_ReconstructionAlgorithm, reconstructionAlgorithm).good() && !reconstructionAlgorithm.empty()) + DcmItem *item = ctReconstructionSequence->getItem(0); + if (item != NULL) { - /* determine CT reconstruction algorithm code from CID 10033 */ - DSRCodedEntryValue reconstructionAlgorithmCode(CID10033e_CTReconstructionAlgorithm::mapReconstructionAlgorithm(reconstructionAlgorithm)); - if (reconstructionAlgorithmCode.isComplete()) + OFString reconstructionAlgorithm; + if (getStringValueFromDataset(*item, DCM_ReconstructionAlgorithm, reconstructionAlgorithm).good() && !reconstructionAlgorithm.empty()) { - CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_ReconstructionAlgorithm, check)); - CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(reconstructionAlgorithmCode, check)); - CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1605 - Row 2")); - } else { - /* do not treat this as an error, just report a warning */ - DCMSR_CMR_WARN("Cannot map Reconstruction Algorithm '" << reconstructionAlgorithm << "' to a coded entry (not in CID 10033)"); + /* determine CT reconstruction algorithm code from CID 10033 */ + DSRCodedEntryValue reconstructionAlgorithmCode; + if (CID10033e_CTReconstructionAlgorithm::mapReconstructionAlgorithm(reconstructionAlgorithm, reconstructionAlgorithmCode).good()) + { + CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Code, CODE_DCM_ReconstructionAlgorithm, check)); + CHECK_RESULT(tree.getCurrentContentItem().setCodeValue(reconstructionAlgorithmCode, check)); + CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1605 - Row 2")); + } else { + /* do not treat this as an error, just report a warning */ + DCMSR_CMR_WARN("Cannot map Reconstruction Algorithm '" << reconstructionAlgorithm << "' to a coded entry (not in CID 10033)"); + } } } } @@ -638,18 +828,23 @@ OFCondition TID1600_ImageLibrary::addComputedTomographyDescriptors(DSRDocumentSu OFCondition TID1600_ImageLibrary::addMagneticResonanceDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = EC_Normal; /* TID 1606 (Image Library Entry Descriptors for MR) Row 1 */ - OFString sequenceName; - /* get one of two alternative elements values */ - if ((getStringValueFromDataset(dataset, DCM_PulseSequenceName, sequenceName).good() && !sequenceName.empty()) || - (getStringValueFromDataset(dataset, DCM_SequenceName, sequenceName).good() && !sequenceName.empty())) + if (checkDescriptorToBeAdded(CODE_DCM_PulseSequenceName, mode, descriptors)) { - CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Text, CODE_DCM_PulseSequenceName, check)); - CHECK_RESULT(tree.getCurrentContentItem().setStringValue(sequenceName, check)); - CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1606 - Row 1")); + OFString sequenceName; + /* get one of two alternative elements values */ + if ((getStringValueFromDataset(dataset, DCM_PulseSequenceName, sequenceName).good() && !sequenceName.empty()) || + (getStringValueFromDataset(dataset, DCM_SequenceName, sequenceName).good() && !sequenceName.empty())) + { + CHECK_RESULT(tree.addContentItem(RT_hasAcqContext, VT_Text, CODE_DCM_PulseSequenceName, check)); + CHECK_RESULT(tree.getCurrentContentItem().setStringValue(sequenceName, check)); + CHECK_RESULT(tree.getCurrentContentItem().setAnnotationText("TID 1606 - Row 1")); + } } return result; } @@ -657,6 +852,8 @@ OFCondition TID1600_ImageLibrary::addMagneticResonanceDescriptors(DSRDocumentSub OFCondition TID1600_ImageLibrary::addPositronEmissionTomographyDescriptors(DSRDocumentSubTree &tree, DcmItem &dataset, + const AddImageMode mode, + const ConceptNameList &descriptors, const OFBool check) { OFCondition result = EC_Normal; @@ -669,23 +866,32 @@ OFCondition TID1600_ImageLibrary::addPositronEmissionTomographyDescriptors(DSRDo if (item != NULL) { /* TID 1607 (Image Library Entry Descriptors for PET) Row 1 */ - CHECK_RESULT(addCodeContentItemFromDataset(tree, *item, DCM_RadionuclideCodeSequence, CODE_SRT_Radionuclide, "TID 1607 - Row 1", check)); + if (checkDescriptorToBeAdded(CODE_SRT_Radionuclide, mode, descriptors)) + CHECK_RESULT(addCodeContentItemFromDataset(tree, *item, DCM_RadionuclideCodeSequence, CODE_SRT_Radionuclide, "TID 1607 - Row 1", check)); /* TID 1607 (Image Library Entry Descriptors for PET) Row 2 */ - CHECK_RESULT(addCodeContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalCodeSequence, CODE_SRT_RadiopharmaceuticalAgent, "TID 1607 - Row 2", check)); + if (checkDescriptorToBeAdded(CODE_SRT_RadiopharmaceuticalAgent, mode, descriptors)) + CHECK_RESULT(addCodeContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalCodeSequence, CODE_SRT_RadiopharmaceuticalAgent, "TID 1607 - Row 2", check)); /* TID 1607 (Image Library Entry Descriptors for PET) Row 3 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, *item, DCM_RadionuclideHalfLife, 0 /*pos*/, CODE_SRT_HalfLifeOfRadiopharmaceutical, CODE_UCUM_s, "TID 1607 - Row 3", check)); + if (checkDescriptorToBeAdded(CODE_SRT_HalfLifeOfRadiopharmaceutical, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, *item, DCM_RadionuclideHalfLife, 0 /*pos*/, CODE_SRT_HalfLifeOfRadiopharmaceutical, CODE_UCUM_s, "TID 1607 - Row 3", check)); /* TID 1607 (Image Library Entry Descriptors for PET) Row 4 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalStartDateTime, 0 /*pos*/, VT_DateTime, CODE_DCM_RadiopharmaceuticalStartDateTime, "TID 1607 - Row 4", check)); + if (checkDescriptorToBeAdded(CODE_DCM_RadiopharmaceuticalStartDateTime, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalStartDateTime, 0 /*pos*/, VT_DateTime, CODE_DCM_RadiopharmaceuticalStartDateTime, "TID 1607 - Row 4", check)); /* TID 1607 (Image Library Entry Descriptors for PET) Row 5 */ - CHECK_RESULT(addStringContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalStopDateTime, 0 /*pos*/, VT_DateTime, CODE_DCM_RadiopharmaceuticalStopDateTime, "TID 1607 - Row 5", check)); + if (checkDescriptorToBeAdded(CODE_DCM_RadiopharmaceuticalStopDateTime, mode, descriptors)) + CHECK_RESULT(addStringContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalStopDateTime, 0 /*pos*/, VT_DateTime, CODE_DCM_RadiopharmaceuticalStopDateTime, "TID 1607 - Row 5", check)); /* TID 1607 (Image Library Entry Descriptors for PET) Row 6 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalVolume, 0 /*pos*/, CODE_DCM_RadiopharmaceuticalVolume, CODE_UCUM_cm3 /*might change with a CP*/, "TID 1607 - Row 6", check)); + if (checkDescriptorToBeAdded(CODE_DCM_RadiopharmaceuticalVolume, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalVolume, 0 /*pos*/, CODE_DCM_RadiopharmaceuticalVolume, CODE_UCUM_cm3 /*might change with a CP*/, "TID 1607 - Row 6", check)); /* TID 1607 (Image Library Entry Descriptors for PET) Row 7 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, *item, DCM_RadionuclideTotalDose, 0 /*pos*/, CODE_DCM_RadionuclideTotalDose, CODE_UCUM_Bq, "TID 1607 - Row 7", check)); + if (checkDescriptorToBeAdded(CODE_DCM_RadionuclideTotalDose, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, *item, DCM_RadionuclideTotalDose, 0 /*pos*/, CODE_DCM_RadionuclideTotalDose, CODE_UCUM_Bq, "TID 1607 - Row 7", check)); /* TID 1607 (Image Library Entry Descriptors for PET) Row 8 */ - CHECK_RESULT(addNumericContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalSpecificActivity, 0 /*pos*/, CODE_DCM_RadiopharmaceuticalSpecificActivity, CODE_UCUM_BqPerMol, "TID 1607 - Row 8", check)); + if (checkDescriptorToBeAdded(CODE_DCM_RadiopharmaceuticalSpecificActivity, mode, descriptors)) + CHECK_RESULT(addNumericContentItemFromDataset(tree, *item, DCM_RadiopharmaceuticalSpecificActivity, 0 /*pos*/, CODE_DCM_RadiopharmaceuticalSpecificActivity, CODE_UCUM_BqPerMol, "TID 1607 - Row 8", check)); /* TID 1607 (Image Library Entry Descriptors for PET) Row 9 */ - CHECK_RESULT(addCodeContentItemFromDataset(tree, *item, DCM_AdministrationRouteCodeSequence, CODE_SRT_RouteOfAdministration, "TID 1607 - Row 9", check)); + if (checkDescriptorToBeAdded(CODE_SRT_RouteOfAdministration, mode, descriptors)) + CHECK_RESULT(addCodeContentItemFromDataset(tree, *item, DCM_AdministrationRouteCodeSequence, CODE_SRT_RouteOfAdministration, "TID 1607 - Row 9", check)); } } /* TID 1607 (Image Library Entry Descriptors for PET) Row 10 to 11 @@ -708,11 +914,18 @@ OFCondition TID1600_ImageLibrary::goAndCheckImageLibraryEntry(const DSRCodedEntr /* go to last image library entry (if any) */ if (gotoEntryFromNodeList(this, LAST_IMAGE_LIBRARY_ENTRY) > 0) { - /* check whether TID 1602 (Image Library Entry Descriptors) Row 1 has correct value */ - if ((gotoNamedChildNode(CODE_DCM_Modality) > 0) && (getCurrentContentItem().getCodeValue() == modalityCode)) - result = EC_Normal; - else - result = CMR_EC_WrongImageLibraryEntryDescriptorModality; + /* check whether TID 1602 (Image Library Entry Descriptors) Row 1 is present */ + if (gotoNamedChildNode(CODE_DCM_Modality) > 0) + { + /* ... and has the expected value */ + if (getCurrentContentItem().getCodeValue() == modalityCode) + result = EC_Normal; + else + result = CMR_EC_WrongImageLibraryEntryDescriptorModality; + } else { + /* tbd: could also check whether the Modality is available one level higher */ + result = CMR_EC_MissingImageLibraryEntryDescriptorModality; + } } return result; } @@ -846,6 +1059,53 @@ OFCondition TID1600_ImageLibrary::setNumericContentItemFromValue(const DSRCodedE // static helper functions +OFBool TID1600_ImageLibrary::anyDescriptorsToBeAdded(const AddImageMode mode, + const ConceptNameList &descriptors) +{ + /* check whether there are any descriptors to be added (at all) */ + return (mode == withAllDescriptors) || ((mode == withSelectedDescriptors) && !descriptors.empty()) || (mode == withoutSelectedDescriptors); +} + + +OFBool TID1600_ImageLibrary::checkDescriptorToBeAdded(const DSRBasicCodedEntry &conceptName, + const AddImageMode mode, + const ConceptNameList &descriptors) +{ + OFBool result = OFFalse; + /* check which "add mode" to use */ + switch (mode) + { + case withoutDescriptors: + result = OFFalse; + break; + case withAllDescriptors: + result = OFTrue; + break; + case withSelectedDescriptors: + { + OFListConstIterator(DSRBasicCodedEntry) iter = descriptors.begin(); + const OFListConstIterator(DSRBasicCodedEntry) last = descriptors.end(); + const DSRCodedEntryValue codedEntry(conceptName); + while ((iter != last) && (codedEntry != *iter)) + ++iter; + result = (iter != last); + break; + } + case withoutSelectedDescriptors: + { + OFListConstIterator(DSRBasicCodedEntry) iter = descriptors.begin(); + const OFListConstIterator(DSRBasicCodedEntry) last = descriptors.end(); + const DSRCodedEntryValue codedEntry(conceptName); + while ((iter != last) && (codedEntry != *iter)) + ++iter; + result = (iter == last); + break; + } + } + return result; +} + + OFCondition TID1600_ImageLibrary::addStringContentItemFromDataset(DSRDocumentSubTree &tree, DcmItem &dataset, const DcmTagKey &tagKey, diff --git a/dcmsr/libcmr/tid300.cc b/dcmsr/libcmr/tid300.cc new file mode 100644 index 00000000..bdf2b2f9 --- /dev/null +++ b/dcmsr/libcmr/tid300.cc @@ -0,0 +1,554 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Source file for class TID300_Measurement + * + * Author: Joerg Riesmeier + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/cmr/tid300.h" +#include "dcmtk/dcmsr/cmr/tid15def.h" +#include "dcmtk/dcmsr/cmr/cid6147.h" +#include "dcmtk/dcmsr/cmr/cid7181.h" +#include "dcmtk/dcmsr/cmr/cid7464.h" +#include "dcmtk/dcmsr/cmr/cid7469.h" +#include "dcmtk/dcmsr/cmr/logger.h" +#include "dcmtk/dcmsr/codes/dcm.h" +#include "dcmtk/dcmsr/codes/srt.h" + +#include "dcmtk/dcmdata/dcdeftag.h" +#include "dcmtk/dcmdata/dcuid.h" + + +// helper macros for checking the return value of API calls +#define CHECK_RESULT(call) if (result.good()) result = call +#define STORE_RESULT(call) result = call +#define GOOD_RESULT(call) if (result.good()) call +#define BAD_RESULT(call) if (result.bad()) call + +// index positions in node list (makes source code more readable) +#define MEASUREMENT 0 +#define LAST_MODIFIER 1 +#define MEASUREMENT_METHOD 2 +#define DERIVATION 3 +#define LAST_FINDING_SITE 4 +#define LAST_DERIVATION_PARAMETER 5 +#define LAST_IMAGE_OR_SCOORD 6 +#define EQUIVALENT_MEANING 7 +#define REAL_WORLD_VALUE_MAP 8 +#define NUMBER_OF_LIST_ENTRIES 9 + +// general information on TID 300 (Measurement) +#define TEMPLATE_NUMBER "300" +#define MAPPING_RESOURCE "DCMR" +#define MAPPING_RESOURCE_UID UID_DICOMContentMappingResource +#define TEMPLATE_TYPE OFTrue /* extensible */ +#define TEMPLATE_ORDER OFTrue /* significant */ + + +template +TID300_Measurement::TID300_Measurement() + : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID) +{ + setExtensible(TEMPLATE_TYPE); + setOrderSignificant(TEMPLATE_ORDER); + /* need to store position of various content items */ + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES, OFTrue /*initialize*/); +} + + +template +TID300_Measurement::TID300_Measurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check) + : DSRSubTemplate(TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID) +{ + setExtensible(TEMPLATE_TYPE); + setOrderSignificant(TEMPLATE_ORDER); + /* need to store position of various content items */ + reserveEntriesInNodeList(NUMBER_OF_LIST_ENTRIES, OFTrue /*initialize*/); + /* create the mandatory "root" content item */ + createMeasurement(conceptName, numericValue, check); +} + + +template +void TID300_Measurement::clear() +{ + DSRSubTemplate::clear(); +} + + +template +OFBool TID300_Measurement::isValid() const +{ + /* check whether base class is valid and all required content items are present */ + return DSRSubTemplate::isValid() && hasMeasurement(); +} + + +template +OFBool TID300_Measurement::hasMeasurement() const +{ + /* check for content item at TID 300 (Measurement) Row 1 */ + return (getEntryFromNodeList(MEASUREMENT) > 0); +} + + +template +OFCondition TID300_Measurement::createNewMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check) +{ + clear(); + /* TID 300 (Measurement) Row 1 */ + return createMeasurement(conceptName, numericValue, check); +} + + +template +OFCondition TID300_Measurement::addModifier(const DSRCodedEntryValue &conceptName, + const DSRCodedEntryValue &modifier, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameters */ + if (conceptName.isComplete() && modifier.isComplete()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* go to last instance of TID 300 (Measurement) Row 2 (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_MODIFIER) == getEntryFromNodeList(MEASUREMENT)) + { + /* need to add the new content item as the first child */ + if (addContentItem(RT_hasConceptMod, VT_Code, AM_belowCurrentBeforeFirstChild) > 0) + { + if (getCurrentContentItem().setConceptName(conceptName, check).good()) + result = EC_Normal; + else + result = SR_EC_InvalidConceptName; + } else + result = SR_EC_CannotAddContentItem; + } else + STORE_RESULT(addContentItem(RT_hasConceptMod, VT_Code, conceptName, check)); + CHECK_RESULT(getCurrentContentItem().setCodeValue(modifier, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 300 - Row 2")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_MODIFIER, getNodeID())); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID300_Measurement::setMeasurementMethod(const T_Method &method, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameter */ + if (method.hasSelectedValue()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* TID 300 (Measurement) Row 3 */ + STORE_RESULT(addOrReplaceContentItem(MEASUREMENT_METHOD, RT_hasConceptMod, VT_Code, CODE_SRT_MeasurementMethod, "TID 300 - Row 3", check)); + CHECK_RESULT(getCurrentContentItem().setCodeValue(method, check)); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID300_Measurement::setDerivation(const T_Derivation &derivation, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameter */ + if (derivation.hasSelectedValue()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* TID 300 (Measurement) Row 4 */ + STORE_RESULT(addOrReplaceContentItem(DERIVATION, RT_hasConceptMod, VT_Code, CODE_DCM_Derivation, "TID 300 - Row 4", check)); + CHECK_RESULT(getCurrentContentItem().setCodeValue(derivation, check)); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID300_Measurement::addFindingSite(const DSRCodedEntryValue &site, + const CID244e_Laterality &laterality, + const DSRCodedEntryValue &siteModifier, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of mandatory parameter */ + if (site.isComplete()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* create a new subtree in order to "rollback" in case of error */ + DSRDocumentSubTree *subTree = new DSRDocumentSubTree; + if (subTree != NULL) + { + /* TID 300 (Measurement) Row 5 */ + CHECK_RESULT(subTree->addContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_FindingSite, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(site, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 300 - Row 5")); + const size_t lastNode = subTree->getNodeID(); + /* TID 300 (Measurement) Row 6 - optional */ + if (laterality.hasSelectedValue()) + { + CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_Laterality, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(laterality, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 300 - Row 6")); + GOOD_RESULT(subTree->gotoParent()); + } + /* TID 300 (Measurement) Row 7 - optional */ + if (siteModifier.isComplete()) + { + CHECK_RESULT(subTree->addChildContentItem(RT_hasConceptMod, VT_Code, CODE_SRT_TopographicalModifier, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setCodeValue(siteModifier, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 300 - Row 7")); + GOOD_RESULT(subTree->gotoParent()); + } + /* if everything was OK, insert new subtree into the template */ + if (result.good() && !subTree->isEmpty()) + { + /* go to last measurement (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_FINDING_SITE) == getEntryFromNodeList(MEASUREMENT)) + { + /* insert subtree below root */ + STORE_RESULT(insertSubTree(subTree, AM_belowCurrent)); + } else { + /* insert subtree after current position */ + STORE_RESULT(insertSubTree(subTree, AM_afterCurrent)); + } + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_FINDING_SITE, lastNode)); + /* in case of error, make sure that memory is freed */ + BAD_RESULT(delete subTree); + } else { + /* delete the new subtree since it has not been inserted */ + delete subTree; + } + } else + result = EC_MemoryExhausted; + } else + result = CMR_EC_NoMeasurement; + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID300_Measurement::addDerivationParameter(const DSRCodedEntryValue &conceptName, + const CMR_SRNumericMeasurementValue &numericValue, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameters */ + if (conceptName.isComplete() && numericValue.isComplete()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* go to last derivation parameter (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_DERIVATION_PARAMETER) == getEntryFromNodeList(MEASUREMENT)) + { + /* insert TID 300 (Measurement) Row 9 below root */ + STORE_RESULT(addChildContentItem(RT_inferredFrom, VT_Num, conceptName, check)); + } else { + /* insert TID 300 (Measurement) Row 9 after current position */ + STORE_RESULT(addContentItem(RT_inferredFrom, VT_Num, conceptName, check)); + } + CHECK_RESULT(getCurrentContentItem().setNumericValue(numericValue, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 300 - Row 9")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_DERIVATION_PARAMETER, getNodeID())); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID300_Measurement::addImage(const DSRCodedEntryValue &conceptName, + const DSRImageReferenceValue &imageReference, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameters */ + if (conceptName.isComplete() && imageReference.isComplete()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* go to last image or spatial coordinates (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_IMAGE_OR_SCOORD) == getEntryFromNodeList(MEASUREMENT)) + { + /* insert TID 320 (Image or Spatial Coordinates) Row 1 below root */ + STORE_RESULT(addChildContentItem(RT_inferredFrom, VT_Image, conceptName, check)); + } else { + /* insert TID 320 (Image or Spatial Coordinates) Row 1 after current position */ + STORE_RESULT(addContentItem(RT_inferredFrom, VT_Image, conceptName, check)); + } + CHECK_RESULT(getCurrentContentItem().setImageReference(imageReference, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 320 - Row 1")); + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_IMAGE_OR_SCOORD, getNodeID())); + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID300_Measurement::addImage(const DSRCodedEntryValue &conceptName, + DcmItem &dataset, + const OFBool check) +{ + DSRImageReferenceValue imageReference; + /* first, create the referenced image object */ + OFCondition result = imageReference.setReference(dataset, check); + /* then, add/set the corresponding content item */ + CHECK_RESULT(addImage(conceptName, imageReference, check)); + return result; +} + + +template +OFCondition TID300_Measurement::addSpatialCoordinates(const DSRCodedEntryValue &conceptName, + const DSRSpatialCoordinatesValue &coordinatesValue, + const DSRImageReferenceValue &imageReference, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameters */ + if (conceptName.isComplete() && imageReference.isComplete()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* create a new subtree in order to "rollback" in case of error */ + DSRDocumentSubTree *subTree = new DSRDocumentSubTree; + if (subTree != NULL) + { + /* TID 320 (Image or Spatial Coordinates) Row 3 */ + STORE_RESULT(subTree->addContentItem(RT_inferredFrom, VT_SCoord, conceptName, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setSpatialCoordinates(coordinatesValue, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 320 - Row 3")); + const size_t lastNode = subTree->getNodeID(); + /* TID 320 (Image or Spatial Coordinates) Row 4 */ + CHECK_RESULT(subTree->addChildContentItem(RT_selectedFrom, VT_Image, DSRCodedEntryValue() /* no concept name */)); + CHECK_RESULT(subTree->getCurrentContentItem().setImageReference(imageReference, check)); + CHECK_RESULT(subTree->getCurrentContentItem().setAnnotationText("TID 300 - Row 4")); + /* if everything was OK, insert new subtree into the template */ + if (result.good() && !subTree->isEmpty()) + { + /* go to last measurement (if any) */ + if (gotoLastEntryFromNodeList(this, LAST_IMAGE_OR_SCOORD) == getEntryFromNodeList(MEASUREMENT)) + { + /* insert subtree below root */ + STORE_RESULT(insertSubTree(subTree, AM_belowCurrent)); + } else { + /* insert subtree after current position */ + STORE_RESULT(insertSubTree(subTree, AM_afterCurrent)); + } + /* store ID of recently added node for later use */ + GOOD_RESULT(storeEntryInNodeList(LAST_IMAGE_OR_SCOORD, lastNode)); + /* in case of error, make sure that memory is freed */ + BAD_RESULT(delete subTree); + } else { + /* delete the new subtree since it has not been inserted */ + delete subTree; + } + } else + result = EC_MemoryExhausted; + } else + result = CMR_EC_NoMeasurement; + } + return result; +} + + +template +OFCondition TID300_Measurement::setEquivalentMeaningOfConceptName(const OFString &meaning, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (!meaning.empty()) + { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* TID 300 (Measurement) Row 16 */ + CHECK_RESULT(addOrReplaceContentItem(EQUIVALENT_MEANING, RT_hasConceptMod, VT_Text, CODE_DCM_EquivalentMeaningOfConceptName, "TID 300 - Row 16", check)); + CHECK_RESULT(getCurrentContentItem().setStringValue(meaning, check)); + } else + result = CMR_EC_NoMeasurement; + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID300_Measurement::setRealWorldValueMap(const DSRCompositeReferenceValue &valueMap, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* basic check of parameter */ + if (valueMap.isComplete()) + { + const char *annotationText = "TID 300 - Row 18"; + const DSRBasicCodedEntry conceptName(CODE_DCM_RealWorldValueMapUsedForMeasurement); + /* check for real world value mapping SOP classes */ + if (valueMap.getSOPClassUID() != UID_RealWorldValueMappingStorage) + { + DCMSR_CMR_WARN("Cannot set value of '" << conceptName.CodeMeaning << "' content item (" << annotationText << ") ... wrong SOP Class"); + DCMSR_CMR_DEBUG("SOP Class UID \"" << valueMap.getSOPClassUID() << "\" does not match the one of the Real World Value Mapping object"); + result = CMR_EC_InvalidRealWorldValueMappingObject; + } else { + /* check whether measurement exists */ + if (hasMeasurement()) + { + /* TID 300 (Measurement) Row 18 */ + CHECK_RESULT(addOrReplaceContentItem(REAL_WORLD_VALUE_MAP, RT_inferredFrom, VT_Composite, conceptName, annotationText, check)); + CHECK_RESULT(getCurrentContentItem().setCompositeReference(valueMap, check)); + } else + result = CMR_EC_NoMeasurement; + } + } else + result = EC_IllegalParameter; + return result; +} + + +template +OFCondition TID300_Measurement::setRealWorldValueMap(DcmItem &dataset, + const OFBool check) +{ + DSRCompositeReferenceValue valueMap; + /* first, create the referenced composite object */ + OFCondition result = valueMap.setReference(dataset, check); + /* then, add/set the corresponding content item */ + CHECK_RESULT(setRealWorldValueMap(valueMap, check)); + return result; +} + + +// protected methods + +template +OFCondition TID300_Measurement::createMeasurement(const T_Measurement &conceptName, + const MeasurementValue &numericValue, + const OFBool check) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameters */ + if (conceptName.hasSelectedValue() && numericValue.isComplete()) + { + /* reassure that the tree is definitely empty */ + if (isEmpty()) + { + /* TID 300 (Measurement) Row 1 */ + STORE_RESULT(addContentItem(RT_unknown, VT_Num, conceptName, check)); + CHECK_RESULT(getCurrentContentItem().setNumericValue(numericValue, check)); + CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 300 - Row 1")); + GOOD_RESULT(storeEntryInNodeList(MEASUREMENT, getNodeID())); + } else + result = SR_EC_InvalidTemplateStructure; + } + return result; +} + + +template +OFCondition TID300_Measurement::addOrReplaceContentItem(const size_t nodePos, + const E_RelationshipType relationshipType, + const E_ValueType valueType, + const DSRCodedEntryValue &conceptName, + const OFString &annotationText, + const OFBool check) +{ + OFCondition result = EC_Normal; + /* check concept name and coded entry value */ + if (conceptName.isComplete()) + { + /* check whether content item already exists */ + if (getEntryFromNodeList(nodePos) == 0) + { + /* if not, create the content item (at correct position) */ + if (gotoLastEntryFromNodeList(this, nodePos) == getEntryFromNodeList(MEASUREMENT)) + { + /* need to add the new content item as the first child */ + if (addContentItem(relationshipType, valueType, AM_belowCurrentBeforeFirstChild) > 0) + { + if (getCurrentContentItem().setConceptName(conceptName, check).bad()) + result = SR_EC_InvalidConceptName; + } else + result = SR_EC_CannotAddContentItem; + + } else { + /* add new content item as a sibling (after the current one) */ + STORE_RESULT(addContentItem(relationshipType, valueType, conceptName)); + } + /* store ID of added node for later use */ + GOOD_RESULT(storeEntryInNodeList(nodePos, getNodeID())); + } + else if (gotoEntryFromNodeList(this, nodePos) > 0) + { + /* make sure that the value type of the existing content item is correct */ + if (getCurrentContentItem().getValueType() != valueType) + { + DCMSR_CMR_WARN("Cannot replace value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ") ... wrong value type"); + result = SR_EC_InvalidContentItem; + } + else if (getCurrentContentItem().getConceptName() != conceptName) + { + DCMSR_CMR_WARN("Cannot replace value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ") ... wrong concept name"); + result = SR_EC_InvalidConceptName; + } else { + DCMSR_CMR_DEBUG("Replacing value of '" << conceptName.getCodeMeaning() + << "' content item (" << annotationText << ")"); + /* the actual replacing of the value is done by the caller of this method */ + } + } else + result = SR_EC_InvalidTemplateStructure; + /* finally, set annotation */ + CHECK_RESULT(getCurrentContentItem().setAnnotationText(annotationText)); + } else + result = SR_EC_InvalidConceptName; + return result; +} + + +// explicit template instantiation (needed for use in TID 1501) +template class TID300_Measurement; diff --git a/dcmsr/libsrc/CMakeLists.txt b/dcmsr/libsrc/CMakeLists.txt index 0304223b..d87c0d77 100644 --- a/dcmsr/libsrc/CMakeLists.txt +++ b/dcmsr/libsrc/CMakeLists.txt @@ -1,5 +1,5 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmsr dsrcitem dsrcodtn dsrcodvl dsrcomtn dsrcomvl dsrcontn dsrcsidl dsrdattn dsrdncsr dsrdoc dsrdocst dsrdoctn dsrdoctr dsrdtitn dsrimgfr dsrimgse dsrimgtn dsrimgvl dsrnumtn dsrnumvl dsrpnmtn dsrposcn dsrrefin dsrreftn dsrscogr dsrsc3gr dsrscotn dsrsc3tn dsrscovl dsrsc3vl dsrsoprf dsrstrvl dsrtcodt dsrtcosp dsrtcotn dsrtcoto dsrtcovl dsrtextn dsrtimtn dsrtpltn dsrtree dsrtypes dsruidtn dsrwavch dsrwavtn dsrwavvl dsrxmlc dsrxmld dsriodcc dsrbascc dsrenhcc dsrcomcc dsrkeycc dsrmamcc dsrchecc dsrcolcc dsrprocc dsrxrdcc dsrspecc dsrmaccc dsrimpcc dsrc3dcc dsrrrdcc dsracqcc dsrsaecc dsrctpl dsrrtpl dsrstpl dsrctxgr) +DCMTK_ADD_LIBRARY(dcmsr dsrcitem dsrcodtn dsrcodvl dsrcomtn dsrcomvl dsrcontn dsrcsidl dsrdattn dsrdncsr dsrdnflt dsrdoc dsrdocst dsrdoctn dsrdoctr dsrdtitn dsrimgfr dsrimgse dsrimgtn dsrimgvl dsritcsr dsrnumtn dsrnumvl dsrpnmtn dsrposcn dsrrefin dsrreftn dsrscogr dsrsc3gr dsrscotn dsrsc3tn dsrscovl dsrsc3vl dsrsoprf dsrstrvl dsrtcodt dsrtcosp dsrtcotn dsrtcoto dsrtcovl dsrtextn dsrtimtn dsrtpltn dsrtree dsrtypes dsruidtn dsrwavch dsrwavtn dsrwavvl dsrxmlc dsrxmld dsriodcc dsrbascc dsrenhcc dsrcomcc dsrkeycc dsrmamcc dsrchecc dsrcolcc dsrprocc dsrxrdcc dsrspecc dsrmaccc dsrimpcc dsrc3dcc dsrrrdcc dsracqcc dsrsaecc dsrprdcc dsrctpl dsrrtpl dsrstpl dsrctxgr) DCMTK_TARGET_LINK_MODULES(dcmsr ofstd oflog dcmdata dcmimgle dcmimage) DCMTK_TARGET_LINK_LIBRARIES(dcmsr ${LIBXML_LIBS}) diff --git a/dcmsr/libsrc/Makefile.dep b/dcmsr/libsrc/Makefile.dep index 1e6ba28b..de51c80c 100644 --- a/dcmsr/libsrc/Makefile.dep +++ b/dcmsr/libsrc/Makefile.dep @@ -937,7 +937,11 @@ dsrctpl.o: dsrctpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdocst.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsritcsr.h \ ../include/dcmtk/dcmsr/dsrcitem.h ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -1150,23 +1154,83 @@ dsrdncsr.o: dsrdncsr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ - ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrtree.h \ - ../include/dcmtk/dcmsr/dsrcodvl.h \ + ../include/dcmtk/dcmsr/dsrdnflt.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrtpltn.h ../include/dcmtk/dcmsr/dsrstpl.h \ - ../include/dcmtk/dcmsr/dsrdoctr.h ../include/dcmtk/dcmsr/dsrdocst.h \ - ../include/dcmtk/dcmsr/dsrcitem.h ../include/dcmtk/dcmsr/dsrnumvl.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ - ../include/dcmtk/dcmsr/dsrscovl.h ../include/dcmtk/dcmsr/dsrscogr.h \ - ../include/dcmtk/dcmsr/dsrtlist.h ../include/dcmtk/dcmsr/dsrsc3vl.h \ - ../include/dcmtk/dcmsr/dsrsc3gr.h ../include/dcmtk/dcmsr/dsrtcovl.h \ - ../include/dcmtk/dcmsr/dsrtcodt.h ../include/dcmtk/dcmsr/dsrtcosp.h \ - ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \ - ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \ - ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \ - ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrtree.h +dsrdnflt.o: dsrdnflt.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/dsrdnflt.h ../include/dcmtk/dcmsr/dsdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ + ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ + ../include/dcmtk/dcmsr/dsrtnant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrtree.h \ + ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \ + ../../ofstd/include/dcmtk/ofstd/ofstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/dsrdoc.h ../include/dcmtk/dcmsr/dsrdoctr.h \ ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsrtree.h \ @@ -1234,7 +1298,11 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -1252,14 +1320,12 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ - ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrxmlc.h \ ../include/dcmtk/dcmsr/dsrpnmtn.h ../include/dcmtk/dcmsr/dsrstrvl.h \ @@ -1267,8 +1333,7 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/dsrtimtn.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ - ../../ofstd/include/dcmtk/ofstd/ofdatime.h + ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h dsrdocst.o: dsrdocst.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsrtree.h \ ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \ @@ -1335,7 +1400,11 @@ dsrdocst.o: dsrdocst.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -1417,17 +1486,18 @@ dsrdoctn.o: dsrdoctn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdtitn.h \ - ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrxmld.h \ - ../include/dcmtk/dcmsr/dsrxmlc.h ../include/dcmtk/dcmsr/dsriodcc.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsrdtitn.h ../include/dcmtk/dcmsr/dsrstrvl.h \ + ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrxmlc.h \ + ../include/dcmtk/dcmsr/dsriodcc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ - ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ - ../../ofstd/include/dcmtk/ofstd/ofdate.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h dsrdoctr.o: dsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -1497,7 +1567,11 @@ dsrdoctr.o: dsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -2060,6 +2134,90 @@ dsriodcc.o: dsriodcc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h +dsritcsr.o: dsritcsr.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrtypes.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ + ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \ + ../../ofstd/include/dcmtk/ofstd/ofstack.h \ + ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrtree.h \ + ../include/dcmtk/dcmsr/dsrcodvl.h \ + ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ + ../include/dcmtk/dcmsr/dsrtpltn.h ../include/dcmtk/dcmsr/dsrstpl.h \ + ../include/dcmtk/dcmsr/dsrdoctr.h ../include/dcmtk/dcmsr/dsrdocst.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsrcitem.h ../include/dcmtk/dcmsr/dsrnumvl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ + ../include/dcmtk/dcmsr/dsrscovl.h ../include/dcmtk/dcmsr/dsrscogr.h \ + ../include/dcmtk/dcmsr/dsrtlist.h ../include/dcmtk/dcmsr/dsrsc3vl.h \ + ../include/dcmtk/dcmsr/dsrsc3gr.h ../include/dcmtk/dcmsr/dsrtcovl.h \ + ../include/dcmtk/dcmsr/dsrtcodt.h ../include/dcmtk/dcmsr/dsrtcosp.h \ + ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \ + ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \ + ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \ + ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h dsrkeycc.o: dsrkeycc.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/dsrkeycc.h ../include/dcmtk/dcmsr/dsriodcc.h \ ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \ @@ -2516,6 +2674,67 @@ dsrposcn.o: dsrposcn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h +dsrprdcc.o: dsrprdcc.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/dsrprdcc.h ../include/dcmtk/dcmsr/dsriodcc.h \ + ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h dsrprocc.o: dsrprocc.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/dsrprocc.h ../include/dcmtk/dcmsr/dsriodcc.h \ ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \ @@ -2842,7 +3061,11 @@ dsrrtpl.o: dsrrtpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -3516,7 +3739,11 @@ dsrstpl.o: dsrstpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -4135,7 +4362,12 @@ dsrtpltn.o: dsrtpltn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../include/dcmtk/dcmsr/dsrstpl.h ../include/dcmtk/dcmsr/dsrdoctr.h \ ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsrdncsr.h \ - ../include/dcmtk/dcmsr/dsrcitem.h ../include/dcmtk/dcmsr/dsrnumvl.h \ + ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -4305,7 +4537,7 @@ dsrtypes.o: dsrtypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/dsrspecc.h ../include/dcmtk/dcmsr/dsrmaccc.h \ ../include/dcmtk/dcmsr/dsrimpcc.h ../include/dcmtk/dcmsr/dsrc3dcc.h \ ../include/dcmtk/dcmsr/dsrrrdcc.h ../include/dcmtk/dcmsr/dsracqcc.h \ - ../include/dcmtk/dcmsr/dsrsaecc.h \ + ../include/dcmtk/dcmsr/dsrsaecc.h ../include/dcmtk/dcmsr/dsrprdcc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ diff --git a/dcmsr/libsrc/Makefile.in b/dcmsr/libsrc/Makefile.in index 625bf554..81c2cc39 100644 --- a/dcmsr/libsrc/Makefile.in +++ b/dcmsr/libsrc/Makefile.in @@ -22,18 +22,18 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/incl -I$(dcmimgledir)/include -I$(dcmimagedir)/include LOCALDEFS = -objs = dsrdoc.o dsrposcn.o dsrdncsr.o dsrtree.o dsrdoctn.o dsrdoctr.o \ - dsrdocst.o dsrctpl.o dsrrtpl.o dsrstpl.o dsrctxgr.o dsrcitem.o \ - dsrtypes.o dsrimgfr.o dsrimgse.o dsrscogr.o dsrsc3gr.o dsrtcodt.o \ - dsrtcosp.o dsrtcoto.o dsrwavch.o dsrstrvl.o dsrcodvl.o dsrnumvl.o \ - dsrscovl.o dsrsc3vl.o dsrtcovl.o dsrcomvl.o dsrimgvl.o dsrwavvl.o \ - dsrtextn.o dsrcodtn.o dsrnumtn.o dsrdtitn.o dsrdattn.o dsrtimtn.o \ - dsruidtn.o dsrpnmtn.o dsrscotn.o dsrsc3tn.o dsrtcotn.o dsrcomtn.o \ - dsrimgtn.o dsrwavtn.o dsrcontn.o dsrreftn.o dsrtpltn.o \ - dsrsoprf.o dsrrefin.o dsrcsidl.o dsrxmlc.o dsrxmld.o \ +objs = dsrdoc.o dsrposcn.o dsrdncsr.o dsritcsr.o dsrdnflt.o dsrtree.o \ + dsrdoctn.o dsrdoctr.o dsrdocst.o dsrctpl.o dsrrtpl.o dsrstpl.o \ + dsrctxgr.o dsrcitem.o dsrtypes.o dsrimgfr.o dsrimgse.o dsrscogr.o \ + dsrsc3gr.o dsrtcodt.o dsrtcosp.o dsrtcoto.o dsrwavch.o dsrstrvl.o \ + dsrcodvl.o dsrnumvl.o dsrscovl.o dsrsc3vl.o dsrtcovl.o dsrcomvl.o \ + dsrimgvl.o dsrwavvl.o dsrtextn.o dsrcodtn.o dsrnumtn.o dsrdtitn.o \ + dsrdattn.o dsrtimtn.o dsruidtn.o dsrpnmtn.o dsrscotn.o dsrsc3tn.o \ + dsrtcotn.o dsrcomtn.o dsrimgtn.o dsrwavtn.o dsrcontn.o dsrreftn.o \ + dsrtpltn.o dsrsoprf.o dsrrefin.o dsrcsidl.o dsrxmlc.o dsrxmld.o \ dsriodcc.o dsrbascc.o dsrenhcc.o dsrcomcc.o dsrkeycc.o dsrmamcc.o \ dsrchecc.o dsrcolcc.o dsrprocc.o dsrxrdcc.o dsrspecc.o dsrmaccc.o \ - dsrimpcc.o dsrc3dcc.o dsrrrdcc.o dsracqcc.o dsrsaecc.o + dsrimpcc.o dsrc3dcc.o dsrrrdcc.o dsracqcc.o dsrsaecc.o dsrprdcc.o library = libdcmsr.$(LIBEXT) diff --git a/dcmsr/libsrc/dsracqcc.cc b/dcmsr/libsrc/dsracqcc.cc index ecd215f4..4deaf8f7 100644 --- a/dcmsr/libsrc/dsracqcc.cc +++ b/dcmsr/libsrc/dsracqcc.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2018, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -69,7 +69,7 @@ OFBool DSRAcquisitionContextConstraintChecker::checkContentRelationship(const E_ const E_ValueType targetValueType, const OFBool byReference) const { - /* the following code implements the constraints of table A.35.x-2 in DICOM PS3.3 (Supplement 187) */ + /* the following code implements the constraints of table A.35.16-2 in DICOM PS3.3 */ OFBool result = OFFalse; /* by-reference relationships not allowed at all */ if (!byReference) diff --git a/dcmsr/libsrc/dsrcitem.cc b/dcmsr/libsrc/dsrcitem.cc index 41560ac4..196cfb32 100644 --- a/dcmsr/libsrc/dsrcitem.cc +++ b/dcmsr/libsrc/dsrcitem.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -78,6 +78,26 @@ DSRContentItem::~DSRContentItem() } +OFBool DSRContentItem::operator==(const DSRContentItem &item) const +{ + OFBool result = (TreeNode == item.TreeNode); + /* call comparison operator (if referenced tree nodes are not the same) */ + if (!result && (TreeNode != NULL) && (item.TreeNode != NULL)) + result = TreeNode->operator==(*item.TreeNode); + return result; +} + + +OFBool DSRContentItem::operator!=(const DSRContentItem &item) const +{ + OFBool result = (TreeNode != item.TreeNode); + /* call comparison operator (if referenced tree nodes are not the same) */ + if (result && (TreeNode != NULL) && (item.TreeNode != NULL)) + result = TreeNode->operator!=(*item.TreeNode); + return result; +} + + OFBool DSRContentItem::isValid() const { OFBool result = OFFalse; diff --git a/dcmsr/libsrc/dsrcodtn.cc b/dcmsr/libsrc/dsrcodtn.cc index 34a0d281..46adcaef 100644 --- a/dcmsr/libsrc/dsrcodtn.cc +++ b/dcmsr/libsrc/dsrcodtn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -49,6 +49,32 @@ DSRCodeTreeNode::~DSRCodeTreeNode() } +OFBool DSRCodeTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRCodedEntryValue::operator==(*OFstatic_cast(const DSRCodedEntryValue *, OFstatic_cast(const DSRCodeTreeNode *, &node))); + } + return result; +} + + +OFBool DSRCodeTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRCodedEntryValue::operator!=(*OFstatic_cast(const DSRCodedEntryValue *, OFstatic_cast(const DSRCodeTreeNode *, &node))); + } + return result; +} + + DSRCodeTreeNode *DSRCodeTreeNode::clone() const { return new DSRCodeTreeNode(*this); diff --git a/dcmsr/libsrc/dsrcodvl.cc b/dcmsr/libsrc/dsrcodvl.cc index 45e3a3eb..93059abe 100644 --- a/dcmsr/libsrc/dsrcodvl.cc +++ b/dcmsr/libsrc/dsrcodvl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -190,7 +190,7 @@ DSRCodedEntryValue &DSRCodedEntryValue::operator=(const DSRCodedEntryValue &code OFBool DSRCodedEntryValue::operator==(const DSRCodedEntryValue &codedEntryValue) const { - /* Code Meaning is not used for comparing the two codes */ + /* Code Meaning is not used for comparing the two codes, also the "Enhanced Encoding Mode" is not taken into account */ return (CodeValue == codedEntryValue.CodeValue) && (CodingSchemeDesignator == codedEntryValue.CodingSchemeDesignator) && (CodingSchemeVersion == codedEntryValue.CodingSchemeVersion); @@ -199,7 +199,7 @@ OFBool DSRCodedEntryValue::operator==(const DSRCodedEntryValue &codedEntryValue) OFBool DSRCodedEntryValue::operator!=(const DSRCodedEntryValue &codedEntryValue) const { - /* Code Meaning is not used for comparing the two codes */ + /* Code Meaning is not used for comparing the two codes, also the "Enhanced Encoding Mode" is not taken into account */ return (CodeValue != codedEntryValue.CodeValue) || (CodingSchemeDesignator != codedEntryValue.CodingSchemeDesignator) || (CodingSchemeVersion != codedEntryValue.CodingSchemeVersion); diff --git a/dcmsr/libsrc/dsrcomtn.cc b/dcmsr/libsrc/dsrcomtn.cc index b6fd5ece..f204089e 100644 --- a/dcmsr/libsrc/dsrcomtn.cc +++ b/dcmsr/libsrc/dsrcomtn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -50,6 +50,32 @@ DSRCompositeTreeNode::~DSRCompositeTreeNode() } +OFBool DSRCompositeTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRCompositeReferenceValue::operator==(*OFstatic_cast(const DSRCompositeReferenceValue *, OFstatic_cast(const DSRCompositeTreeNode *, &node))); + } + return result; +} + + +OFBool DSRCompositeTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRCompositeReferenceValue::operator!=(*OFstatic_cast(const DSRCompositeReferenceValue *, OFstatic_cast(const DSRCompositeTreeNode *, &node))); + } + return result; +} + + DSRCompositeTreeNode *DSRCompositeTreeNode::clone() const { return new DSRCompositeTreeNode(*this); diff --git a/dcmsr/libsrc/dsrcomvl.cc b/dcmsr/libsrc/dsrcomvl.cc index 26352800..3037082e 100644 --- a/dcmsr/libsrc/dsrcomvl.cc +++ b/dcmsr/libsrc/dsrcomvl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -72,6 +72,20 @@ DSRCompositeReferenceValue &DSRCompositeReferenceValue::operator=(const DSRCompo } +OFBool DSRCompositeReferenceValue::operator==(const DSRCompositeReferenceValue &referenceValue) const +{ + return (SOPClassUID == referenceValue.SOPClassUID) && + (SOPInstanceUID == referenceValue.SOPInstanceUID); +} + + +OFBool DSRCompositeReferenceValue::operator!=(const DSRCompositeReferenceValue &referenceValue) const +{ + return (SOPClassUID != referenceValue.SOPClassUID) || + (SOPInstanceUID != referenceValue.SOPInstanceUID); +} + + void DSRCompositeReferenceValue::clear() { SOPClassUID.clear(); diff --git a/dcmsr/libsrc/dsrcontn.cc b/dcmsr/libsrc/dsrcontn.cc index 2aef16ee..dc927687 100644 --- a/dcmsr/libsrc/dsrcontn.cc +++ b/dcmsr/libsrc/dsrcontn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -50,6 +50,32 @@ DSRContainerTreeNode::~DSRContainerTreeNode() } +OFBool DSRContainerTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = (ContinuityOfContent == OFstatic_cast(const DSRContainerTreeNode *, &node)->ContinuityOfContent); + } + return result; +} + + +OFBool DSRContainerTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = (ContinuityOfContent != OFstatic_cast(const DSRContainerTreeNode *, &node)->ContinuityOfContent); + } + return result; +} + + DSRContainerTreeNode *DSRContainerTreeNode::clone() const { return new DSRContainerTreeNode(*this); diff --git a/dcmsr/libsrc/dsrctpl.cc b/dcmsr/libsrc/dsrctpl.cc index 9da1b43e..6e482f9b 100644 --- a/dcmsr/libsrc/dsrctpl.cc +++ b/dcmsr/libsrc/dsrctpl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -37,6 +37,7 @@ DSRTemplateCommon::DSRTemplateCommon(const OFString &templateIdentifier, MappingResource(mappingResource), MappingResourceUID(mappingResourceUID), ExtensibleMode(OFFalse), + OrderSignificantMode(OFFalse), NodeList() { /* by default, a template is non-extensible */ diff --git a/dcmsr/libsrc/dsrdattn.cc b/dcmsr/libsrc/dsrdattn.cc index b6bd87ef..3e34e62a 100644 --- a/dcmsr/libsrc/dsrdattn.cc +++ b/dcmsr/libsrc/dsrdattn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,32 @@ DSRDateTreeNode::~DSRDateTreeNode() } +OFBool DSRDateTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator==(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRDateTreeNode *, &node))); + } + return result; +} + + +OFBool DSRDateTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator!=(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRDateTreeNode *, &node))); + } + return result; +} + + DSRDateTreeNode *DSRDateTreeNode::clone() const { return new DSRDateTreeNode(*this); diff --git a/dcmsr/libsrc/dsrdncsr.cc b/dcmsr/libsrc/dsrdncsr.cc index 172add7d..dcaa8e4a 100644 --- a/dcmsr/libsrc/dsrdncsr.cc +++ b/dcmsr/libsrc/dsrdncsr.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -16,7 +16,7 @@ * Author: Joerg Riesmeier * * Purpose: - * classes: specialization of DSRTreeNodeCursor (= DSRIncludedTemplateNodeCursor) + * classes: DSRDocumentTreeNodeCursor * */ @@ -25,131 +25,74 @@ #include "dcmtk/dcmsr/dsrdncsr.h" #include "dcmtk/dcmsr/dsrdoctn.h" -#include "dcmtk/dcmsr/dsrtpltn.h" -#include "dcmtk/dcmsr/dsrstpl.h" -DCMTK_EXPLICIT_SPECIALIZATION -const DSRDocumentTreeNode *DSRTreeNodeCursor::getChildNode() const +DSRDocumentTreeNodeCursor::DSRDocumentTreeNodeCursor() + : DSRTreeNodeCursor() { - DSRDocumentTreeNode *node = NULL; - if (NodeCursor != NULL) - { - /* check for special case "included template" */ - if (NodeCursor->getValueType() == DSRTypes::VT_includedTemplate) - { - DSRSubTemplate *subTempl = OFstatic_cast(DSRIncludedTemplateTreeNode *, NodeCursor)->getValue().get(); - if (subTempl != NULL) - { - /* get root node of referenced subtree */ - node = subTempl->getRoot(); - } - } else { - /* standard case */ - node = NodeCursor->getDown(); - } - } - return node; } -DCMTK_EXPLICIT_SPECIALIZATION -size_t DSRTreeNodeCursor::countChildNodes(const OFBool searchIntoSub) const +DSRDocumentTreeNodeCursor::DSRDocumentTreeNodeCursor(const DSRDocumentTreeNodeCursor &cursor) + : DSRTreeNodeCursor(cursor) { - size_t count = 0; - if (NodeCursor != NULL) - { - /* do we have any children at all? */ - DSRTreeNodeCursor cursor(*this); - if (cursor.goDown()) - { - /* iterate over all child nodes */ - do { - ++count; - } while (cursor.iterate(searchIntoSub)); - } - } - return count; } -DCMTK_EXPLICIT_SPECIALIZATION -size_t DSRTreeNodeCursor::goDown() +DSRDocumentTreeNodeCursor::DSRDocumentTreeNodeCursor(const DSRTreeNodeCursor &cursor) + : DSRTreeNodeCursor(cursor) +{ +} + + +DSRDocumentTreeNodeCursor::DSRDocumentTreeNodeCursor(DSRDocumentTreeNode *node, + const DSRPositionCounter *position) + : DSRTreeNodeCursor(node, position) { - size_t nodeID = 0; - if (NodeCursor != NULL) - { - /* check for special case "included template" */ - if (NodeCursor->getValueType() == DSRTypes::VT_includedTemplate) - { - DSRSubTemplate *subTempl = OFstatic_cast(DSRIncludedTemplateTreeNode *, NodeCursor)->getValue().get(); - if (subTempl != NULL) - { - NodeCursorStack.push(NodeCursor); - /* go to root node of referenced subtree */ - NodeCursor = subTempl->getRoot(); - nodeID = NodeCursor->getIdent(); - Position.goDown(); - } - } - /* standard case */ - else if (NodeCursor->getDown() != NULL) - { - NodeCursorStack.push(NodeCursor); - NodeCursor = NodeCursor->getDown(); - nodeID = NodeCursor->getIdent(); - Position.goDown(); - } - } - return nodeID; } -DCMTK_EXPLICIT_SPECIALIZATION -size_t DSRTreeNodeCursor::iterate(const OFBool searchIntoSub) +DSRDocumentTreeNodeCursor::~DSRDocumentTreeNodeCursor() +{ +} + + +DSRDocumentTreeNodeCursor &DSRDocumentTreeNodeCursor::operator=(const DSRDocumentTreeNodeCursor &cursor) +{ + DSRTreeNodeCursor::operator=(cursor); + return *this; +} + + +DSRDocumentTreeNodeCursor &DSRDocumentTreeNodeCursor::operator=(DSRDocumentTreeNode *node) +{ + DSRTreeNodeCursor::operator=(node); + return *this; +} + + +size_t DSRDocumentTreeNodeCursor::gotoMatchingNode(const DSRDocumentTreeNodeFilter &filter, + const OFBool searchIntoSub) { size_t nodeID = 0; - if (NodeCursor != NULL) - { - /* perform "deep search", if specified */ - if (searchIntoSub && hasChildNodes()) - nodeID = goDown(); - else if (NodeCursor->getNext() != NULL) - { - NodeCursor = NodeCursor->getNext(); - nodeID = NodeCursor->getIdent(); - /* check for special case: do not count "included template" nodes? */ - if ((NodeCursor->getValueType() != DSRTypes::VT_includedTemplate) || !(Position.getFlags() & DSRTypes::PF_dontCountIncludedTemplateNodes)) - ++Position; - } - else if (searchIntoSub && !NodeCursorStack.empty()) - { - do { - if (!NodeCursorStack.empty()) - { - NodeCursor = NodeCursorStack.top(); - NodeCursorStack.pop(); - Position.goUp(); - } else - NodeCursor = NULL; - } while ((NodeCursor != NULL) && (NodeCursor->getNext() == NULL)); - if (NodeCursor != NULL) - { - if (NodeCursor->getNext() != NULL) - { - NodeCursor = NodeCursor->getNext(); - nodeID = NodeCursor->getIdent(); - /* check for special case: do not count "included template" nodes? */ - if ((NodeCursor->getValueType() != DSRTypes::VT_includedTemplate) || !(Position.getFlags() & DSRTypes::PF_dontCountIncludedTemplateNodes)) - ++Position; - } - } - } - } + const DSRDocumentTreeNode *node; + /* iterate over all nodes */ + do { + node = getNode(); + /* and check whether it matches */ + if (filter.matches(node)) + nodeID = node->getNodeID(); + } while ((nodeID == 0) && iterate(searchIntoSub)); return nodeID; } -// explicit template instantiation -template class DSRTreeNodeCursor; -template class DSRTreeNodeCursor; +size_t DSRDocumentTreeNodeCursor::gotoNextMatchingNode(const DSRDocumentTreeNodeFilter &filter, + const OFBool searchIntoSub) +{ + /* first, goto "next" node */ + size_t nodeID = iterate(searchIntoSub); + if (nodeID > 0) + nodeID = gotoMatchingNode(filter, searchIntoSub); + return nodeID; +} diff --git a/dcmsr/libsrc/dsrdnflt.cc b/dcmsr/libsrc/dsrdnflt.cc new file mode 100644 index 00000000..32f4d59b --- /dev/null +++ b/dcmsr/libsrc/dsrdnflt.cc @@ -0,0 +1,332 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmsr + * + * Author: Joerg Riesmeier + * + * Purpose: + * classes: DSRDocumentTreeNodeFilter and derived implementations + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsrdnflt.h" +#include "dcmtk/dcmsr/dsrdoctn.h" + +#include "dcmtk/dcmdata/dcvrdt.h" + + +// implementation of base filter + +DSRDocumentTreeNodeFilter::~DSRDocumentTreeNodeFilter() +{ +} + + +// implementation of filter list + +DSRDocumentTreeNodeFilterList::~DSRDocumentTreeNodeFilterList() +{ + OFListIterator(DSRDocumentTreeNodeFilter *) iter = FilterList.begin(); + const OFListConstIterator(DSRDocumentTreeNodeFilter *) last = FilterList.end(); + /* delete all filters and free memory */ + while (iter != last) + { + delete (*iter); + iter = FilterList.erase(iter); + } +} + + +OFCondition DSRDocumentTreeNodeFilterList::addFilter(DSRDocumentTreeNodeFilter *filter) +{ + OFCondition result = EC_IllegalParameter; + /* basic check of parameter */ + if (filter != NULL) + { + FilterList.push_back(filter); + result = EC_Normal; + } + return result; +} + + +// implementation of AND filter + +DSRDocumentTreeNodeAndFilter::~DSRDocumentTreeNodeAndFilter() +{ +} + + +OFBool DSRDocumentTreeNodeAndFilter::matches(const DSRDocumentTreeNode *node) const +{ + OFBool result = OFFalse; + if (node != NULL) + { + result = OFTrue; + /* check whether all filters match */ + OFListConstIterator(DSRDocumentTreeNodeFilter *) iter = FilterList.begin(); + const OFListConstIterator(DSRDocumentTreeNodeFilter *) last = FilterList.end(); + while ((iter != last) && result) + { + result = (*iter)->matches(node); + ++iter; + } + } + return result; +} + + +// implementation of OR filter + +DSRDocumentTreeNodeOrFilter::~DSRDocumentTreeNodeOrFilter() +{ +} + + +OFBool DSRDocumentTreeNodeOrFilter::matches(const DSRDocumentTreeNode *node) const +{ + OFBool result = OFFalse; + if (node != NULL) + { + /* check whether one of the filters matches */ + OFListConstIterator(DSRDocumentTreeNodeFilter *) iter = FilterList.begin(); + const OFListConstIterator(DSRDocumentTreeNodeFilter *) last = FilterList.end(); + while ((iter != last) && !result) + { + result = (*iter)->matches(node); + ++iter; + } + } + return result; +} + + +// implementation of "has Children" filter + +DSRDocumentTreeNodeHasChildrenFilter::DSRDocumentTreeNodeHasChildrenFilter(const OFBool hasChildren) + : HasChildren(hasChildren) +{ +} + + +DSRDocumentTreeNodeHasChildrenFilter::~DSRDocumentTreeNodeHasChildrenFilter() +{ +} + + +OFBool DSRDocumentTreeNodeHasChildrenFilter::matches(const DSRDocumentTreeNode *node) const +{ + /* check whether the expected value matches */ + return (node != NULL) && (node->hasChildNodes() == HasChildren); +} + + +// implementation of "has Siblings" filter + +DSRDocumentTreeNodeHasSiblingsFilter::DSRDocumentTreeNodeHasSiblingsFilter(const OFBool hasSiblings) + : HasSiblings(hasSiblings) +{ +} + + +DSRDocumentTreeNodeHasSiblingsFilter::~DSRDocumentTreeNodeHasSiblingsFilter() +{ +} + + +OFBool DSRDocumentTreeNodeHasSiblingsFilter::matches(const DSRDocumentTreeNode *node) const +{ + /* check whether the expected value matches */ + return (node != NULL) && (node->hasSiblingNodes() == HasSiblings); +} + + +// implementation of Concept Name filter + +DSRDocumentTreeNodeConceptNameFilter::DSRDocumentTreeNodeConceptNameFilter(const DSRCodedEntryValue &conceptName) + : ConceptName(conceptName) +{ +} + + +DSRDocumentTreeNodeConceptNameFilter::~DSRDocumentTreeNodeConceptNameFilter() +{ +} + + +OFBool DSRDocumentTreeNodeConceptNameFilter::matches(const DSRDocumentTreeNode *node) const +{ + /* check whether the concept name matches */ + return (node != NULL) && (node->getConceptName() == ConceptName); +} + + +// implementation of Value Type filter + +DSRDocumentTreeNodeValueTypeFilter::DSRDocumentTreeNodeValueTypeFilter(const DSRTypes::E_ValueType &valueType) + : ValueType(valueType) +{ +} + + +DSRDocumentTreeNodeValueTypeFilter::~DSRDocumentTreeNodeValueTypeFilter() +{ +} + + +OFBool DSRDocumentTreeNodeValueTypeFilter::matches(const DSRDocumentTreeNode *node) const +{ + /* check whether the value type matches */ + return (node != NULL) && (node->getValueType() == ValueType); +} + + +// implementation of Relationship Type filter + +DSRDocumentTreeNodeRelationshipTypeFilter::DSRDocumentTreeNodeRelationshipTypeFilter(const DSRTypes::E_RelationshipType &relationshipType) + : RelationshipType(relationshipType) +{ +} + + +DSRDocumentTreeNodeRelationshipTypeFilter::~DSRDocumentTreeNodeRelationshipTypeFilter() +{ +} + + +OFBool DSRDocumentTreeNodeRelationshipTypeFilter::matches(const DSRDocumentTreeNode *node) const +{ + /* check whether the relationship type matches */ + return (node != NULL) && (node->getRelationshipType() == RelationshipType); +} + + +// implementation of Annotation filter + +DSRDocumentTreeNodeAnnotationFilter::DSRDocumentTreeNodeAnnotationFilter(const DSRTreeNodeAnnotation &annotation) + : Annotation(annotation) +{ +} + + +DSRDocumentTreeNodeAnnotationFilter::~DSRDocumentTreeNodeAnnotationFilter() +{ +} + + +OFBool DSRDocumentTreeNodeAnnotationFilter::matches(const DSRDocumentTreeNode *node) const +{ + /* check whether the annotation matches */ + return (node != NULL) && (node->getAnnotation() == Annotation); +} + + +// implementation of Observation Date/Time filter + +DSRDocumentTreeNodeObservationDateTimeFilter::DSRDocumentTreeNodeObservationDateTimeFilter(const OFString &fromDateTime, + const OFString &toDateTime) + : FromDateTime(fromDateTime), + ToDateTime(toDateTime), + FromDateTimeValue(), + ToDateTimeValue() +{ + /* convert to internal format only once */ + DcmDateTime::getOFDateTimeFromString(fromDateTime, FromDateTimeValue); + DcmDateTime::getOFDateTimeFromString(toDateTime, ToDateTimeValue); +} + + +DSRDocumentTreeNodeObservationDateTimeFilter::~DSRDocumentTreeNodeObservationDateTimeFilter() +{ +} + + +OFBool DSRDocumentTreeNodeObservationDateTimeFilter::matches(const DSRDocumentTreeNode *node) const +{ + OFBool result = OFFalse; + /* check whether the observation date/time matches */ + if (node != NULL) + { + /* special case: empty value */ + if (node->getObservationDateTime().empty()) + result = FromDateTime.empty() && ToDateTime.empty(); + else { + const OFBool fromDateTimeValid = FromDateTimeValue.isValid(); + const OFBool toDateTimeValid = ToDateTimeValue.isValid(); + /* check for valid date/time range */ + if (fromDateTimeValid || toDateTimeValid) + { + OFDateTime dateTimeValue; + if (DcmDateTime::getOFDateTimeFromString(node->getObservationDateTime(), dateTimeValue).good()) + { + /* NB: see limitations of OFDateTime class regarding "<=" comparison */ + if (fromDateTimeValid && toDateTimeValid) + result = (FromDateTimeValue <= dateTimeValue) && (dateTimeValue <= ToDateTimeValue); + else if (fromDateTimeValid) + result = (FromDateTimeValue <= dateTimeValue); + else /* toDateTimeValid */ + result = (dateTimeValue <= ToDateTimeValue); + } + } + } + } + return result; +} + + +// implementation of Observation UID filter + +DSRDocumentTreeNodeObservationUIDFilter::DSRDocumentTreeNodeObservationUIDFilter(const OFString &observationUID) + : ObservationUID(observationUID) +{ +} + + +DSRDocumentTreeNodeObservationUIDFilter::~DSRDocumentTreeNodeObservationUIDFilter() +{ +} + + +OFBool DSRDocumentTreeNodeObservationUIDFilter::matches(const DSRDocumentTreeNode *node) const +{ + /* check whether the observation UID matches */ + return (node != NULL) && (node->getObservationUID() == ObservationUID); +} + + +// implementation of Template Identification filter + +DSRDocumentTreeNodeTemplateIdentificationFilter::DSRDocumentTreeNodeTemplateIdentificationFilter(const OFString &templateIdentifier, + const OFString &mappingResource, + const OFString &mappingResourceUID) + : TemplateIdentifier(templateIdentifier), + MappingResource(mappingResource), + MappingResourceUID(mappingResourceUID) +{ +} + + +DSRDocumentTreeNodeTemplateIdentificationFilter::~DSRDocumentTreeNodeTemplateIdentificationFilter() +{ +} + + +OFBool DSRDocumentTreeNodeTemplateIdentificationFilter::matches(const DSRDocumentTreeNode *node) const +{ + /* check whether the observation date/time matches */ + return (node != NULL) && (node->compareTemplateIdentification(TemplateIdentifier, MappingResource, MappingResourceUID)); +} diff --git a/dcmsr/libsrc/dsrdocst.cc b/dcmsr/libsrc/dsrdocst.cc index 1e2243dc..ef3fb25b 100644 --- a/dcmsr/libsrc/dsrdocst.cc +++ b/dcmsr/libsrc/dsrdocst.cc @@ -296,6 +296,20 @@ OFBool DSRDocumentSubTree::getCursorToRootNode(DSRIncludedTemplateNodeCursor &cu } +OFBool DSRDocumentSubTree::getCursorToCurrentNode(DSRDocumentTreeNodeCursor &cursor) const +{ + cursor = DSRDocumentTreeNodeCursor(getNode()); + return cursor.isValid(); +} + + +OFBool DSRDocumentSubTree::getCursorToSubTree(DSRDocumentTreeNodeCursor &cursor) const +{ + cursor = DSRDocumentTreeNodeCursor(getChild()); + return cursor.isValid(); +} + + size_t DSRDocumentSubTree::countNodes(const OFBool searchIntoSubTemplates, const OFBool countIncludedTemplateNodes) const { @@ -334,6 +348,36 @@ size_t DSRDocumentSubTree::countNodes(const OFBool searchIntoSubTemplates, } +size_t DSRDocumentSubTree::gotoMatchingNode(const DSRDocumentTreeNodeFilter &filter, + const OFBool startFromRoot, + const OFBool searchIntoSub) +{ + size_t nodeID = 0; + if (startFromRoot) + gotoRoot(); + const DSRDocumentTreeNode *node; + /* iterate over all nodes */ + do { + node = getNode(); + /* and check whether it matches */ + if (filter.matches(node)) + nodeID = node->getNodeID(); + } while ((nodeID == 0) && iterate(searchIntoSub)); + return nodeID; +} + + +size_t DSRDocumentSubTree::gotoNextMatchingNode(const DSRDocumentTreeNodeFilter &filter, + const OFBool searchIntoSub) +{ + /* first, goto "next" node */ + size_t nodeID = iterate(searchIntoSub); + if (nodeID > 0) + nodeID = gotoMatchingNode(filter, OFFalse /*startFromRoot*/, searchIntoSub); + return nodeID; +} + + size_t DSRDocumentSubTree::gotoNamedNode(const DSRCodedEntryValue &conceptName, const OFBool startFromRoot, const OFBool searchIntoSub) @@ -938,6 +982,14 @@ size_t DSRDocumentSubTree::removeNode() } +DSRDocumentSubTree *DSRDocumentSubTree::cloneSubTree(const DSRDocumentTreeNodeCursor &startCursor, + const size_t stopAfterNodeID) +{ + /* create a copy of the specified subtree */ + return new DSRDocumentSubTree(startCursor, stopAfterNodeID); +} + + OFCondition DSRDocumentSubTree::includeTemplate(const DSRSharedSubTemplate &subTemplate, const E_AddMode addMode, const E_RelationshipType defaultRelType) diff --git a/dcmsr/libsrc/dsrdoctn.cc b/dcmsr/libsrc/dsrdoctn.cc index e588c84e..bcbfa3ca 100644 --- a/dcmsr/libsrc/dsrdoctn.cc +++ b/dcmsr/libsrc/dsrdoctn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -79,6 +79,24 @@ DSRDocumentTreeNode::~DSRDocumentTreeNode() } +OFBool DSRDocumentTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* only very basic information is used for comparing the two nodes */ + return (RelationshipType == node.RelationshipType) && + (ValueType == node.ValueType) && + (ConceptName == node.ConceptName); +} + + +OFBool DSRDocumentTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* only very basic information is used for comparing the two nodes */ + return (RelationshipType != node.RelationshipType) || + (ValueType != node.ValueType) || + (ConceptName != node.ConceptName); +} + + void DSRDocumentTreeNode::clear() { MarkFlag = OFFalse; diff --git a/dcmsr/libsrc/dsrdtitn.cc b/dcmsr/libsrc/dsrdtitn.cc index 1da208ed..cb440252 100644 --- a/dcmsr/libsrc/dsrdtitn.cc +++ b/dcmsr/libsrc/dsrdtitn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -59,6 +59,32 @@ DSRDateTimeTreeNode::~DSRDateTimeTreeNode() } +OFBool DSRDateTimeTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator==(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRDateTimeTreeNode *, &node))); + } + return result; +} + + +OFBool DSRDateTimeTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator!=(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRDateTimeTreeNode *, &node))); + } + return result; +} + + DSRDateTimeTreeNode *DSRDateTimeTreeNode::clone() const { return new DSRDateTimeTreeNode(*this); diff --git a/dcmsr/libsrc/dsrimgtn.cc b/dcmsr/libsrc/dsrimgtn.cc index 1e12c1cf..c9283490 100644 --- a/dcmsr/libsrc/dsrimgtn.cc +++ b/dcmsr/libsrc/dsrimgtn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -49,6 +49,32 @@ DSRImageTreeNode::~DSRImageTreeNode() } +OFBool DSRImageTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRImageReferenceValue::operator==(*OFstatic_cast(const DSRImageReferenceValue *, OFstatic_cast(const DSRImageTreeNode *, &node))); + } + return result; +} + + +OFBool DSRImageTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRImageReferenceValue::operator!=(*OFstatic_cast(const DSRImageReferenceValue *, OFstatic_cast(const DSRImageTreeNode *, &node))); + } + return result; +} + + DSRImageTreeNode *DSRImageTreeNode::clone() const { return new DSRImageTreeNode(*this); diff --git a/dcmsr/libsrc/dsrimgvl.cc b/dcmsr/libsrc/dsrimgvl.cc index a21e9f1c..d07e5955 100644 --- a/dcmsr/libsrc/dsrimgvl.cc +++ b/dcmsr/libsrc/dsrimgvl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -127,6 +127,28 @@ DSRImageReferenceValue &DSRImageReferenceValue::operator=(const DSRImageReferenc } +OFBool DSRImageReferenceValue::operator==(const DSRImageReferenceValue &referenceValue) const +{ + /* the optional icon image is not used for comparison */ + return DSRCompositeReferenceValue::operator==(referenceValue) && + (FrameList == referenceValue.FrameList) && + (SegmentList == referenceValue.SegmentList) && + (PresentationState == referenceValue.PresentationState) && + (RealWorldValueMapping == referenceValue.RealWorldValueMapping); +} + + +OFBool DSRImageReferenceValue::operator!=(const DSRImageReferenceValue &referenceValue) const +{ + /* the optional icon image is not used for comparison */ + return DSRCompositeReferenceValue::operator!=(referenceValue) || + (FrameList != referenceValue.FrameList) || + (SegmentList != referenceValue.SegmentList) || + (PresentationState != referenceValue.PresentationState) || + (RealWorldValueMapping != referenceValue.RealWorldValueMapping); +} + + void DSRImageReferenceValue::clear() { DSRCompositeReferenceValue::clear(); @@ -662,7 +684,7 @@ OFBool DSRImageReferenceValue::appliesToSegment(const Uint16 segmentNumber) cons OFBool DSRImageReferenceValue::isSegmentationObject(const OFString &sopClassUID) const { - /* check for all segmentation SOP classes (according to DICOM PS 3.6-2015c) */ + /* check for all segmentation SOP classes (according to DICOM PS 3.6-2017e) */ return (sopClassUID == UID_SegmentationStorage) || (sopClassUID == UID_SurfaceSegmentationStorage); } @@ -672,7 +694,7 @@ OFCondition DSRImageReferenceValue::checkSOPClassUID(const OFString &sopClassUID OFCondition result = DSRCompositeReferenceValue::checkSOPClassUID(sopClassUID); if (result.good()) { - /* check for all valid/known SOP classes (according to DICOM PS 3.6-2015c) */ + /* check for all valid/known SOP classes (according to DICOM PS 3.6) */ if (!dcmIsImageStorageSOPClassUID(sopClassUID.c_str()) && !isSegmentationObject(sopClassUID)) { result = SR_EC_InvalidValue; diff --git a/dcmsr/libsrc/dsritcsr.cc b/dcmsr/libsrc/dsritcsr.cc new file mode 100644 index 00000000..7c514a83 --- /dev/null +++ b/dcmsr/libsrc/dsritcsr.cc @@ -0,0 +1,184 @@ +/* + * + * Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmsr + * + * Author: Joerg Riesmeier + * + * Purpose: + * classes: DSRIncludedTemplateNodeCursor + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsritcsr.h" +#include "dcmtk/dcmsr/dsrdoctn.h" +#include "dcmtk/dcmsr/dsrtpltn.h" +#include "dcmtk/dcmsr/dsrstpl.h" + + +DSRIncludedTemplateNodeCursor::DSRIncludedTemplateNodeCursor() + : DSRTreeNodeCursor() +{ +} + + +DSRIncludedTemplateNodeCursor::DSRIncludedTemplateNodeCursor(const DSRIncludedTemplateNodeCursor &cursor) + : DSRTreeNodeCursor(cursor) +{ +} + + +DSRIncludedTemplateNodeCursor::DSRIncludedTemplateNodeCursor(DSRDocumentTreeNode *node, + const DSRPositionCounter *position) + : DSRTreeNodeCursor(node, position) +{ +} + + +DSRIncludedTemplateNodeCursor::~DSRIncludedTemplateNodeCursor() +{ +} + + +DSRIncludedTemplateNodeCursor &DSRIncludedTemplateNodeCursor::operator=(const DSRIncludedTemplateNodeCursor &cursor) +{ + DSRTreeNodeCursor::operator=(cursor); + return *this; +} + + +DSRIncludedTemplateNodeCursor &DSRIncludedTemplateNodeCursor::operator=(DSRDocumentTreeNode *node) +{ + DSRTreeNodeCursor::operator=(node); + return *this; +} + + +const DSRDocumentTreeNode *DSRIncludedTemplateNodeCursor::getChildNode() const +{ + DSRDocumentTreeNode *node = NULL; + if (NodeCursor != NULL) + { + /* check for special case "included template" */ + if (NodeCursor->getValueType() == DSRTypes::VT_includedTemplate) + { + DSRSubTemplate *subTempl = OFstatic_cast(DSRIncludedTemplateTreeNode *, NodeCursor)->getValue().get(); + if (subTempl != NULL) + { + /* get root node of referenced subtree */ + node = subTempl->getRoot(); + } + } else { + /* standard case */ + node = NodeCursor->getDown(); + } + } + return node; +} + + +size_t DSRIncludedTemplateNodeCursor::countChildNodes(const OFBool searchIntoSub) const +{ + size_t count = 0; + if (NodeCursor != NULL) + { + /* do we have any children at all? */ + DSRDocumentTreeNodeCursor cursor(*this); + if (cursor.goDown()) + { + /* iterate over all child nodes */ + do { + ++count; + } while (cursor.iterate(searchIntoSub)); + } + } + return count; +} + + +size_t DSRIncludedTemplateNodeCursor::goDown() +{ + size_t nodeID = 0; + if (NodeCursor != NULL) + { + /* check for special case "included template" */ + if (NodeCursor->getValueType() == DSRTypes::VT_includedTemplate) + { + DSRSubTemplate *subTempl = OFstatic_cast(DSRIncludedTemplateTreeNode *, NodeCursor)->getValue().get(); + if (subTempl != NULL) + { + NodeCursorStack.push(NodeCursor); + /* go to root node of referenced subtree */ + NodeCursor = subTempl->getRoot(); + nodeID = NodeCursor->getIdent(); + Position.goDown(); + } + } + /* standard case */ + else if (NodeCursor->getDown() != NULL) + { + NodeCursorStack.push(NodeCursor); + NodeCursor = NodeCursor->getDown(); + nodeID = NodeCursor->getIdent(); + Position.goDown(); + } + } + return nodeID; +} + + +size_t DSRIncludedTemplateNodeCursor::iterate(const OFBool searchIntoSub) +{ + size_t nodeID = 0; + if (NodeCursor != NULL) + { + /* perform "deep search", if specified */ + if (searchIntoSub && hasChildNodes()) + nodeID = goDown(); + else if (NodeCursor->getNext() != NULL) + { + NodeCursor = NodeCursor->getNext(); + nodeID = NodeCursor->getIdent(); + /* check for special case: do not count "included template" nodes? */ + if ((NodeCursor->getValueType() != DSRTypes::VT_includedTemplate) || !(Position.getFlags() & DSRTypes::PF_dontCountIncludedTemplateNodes)) + ++Position; + } + else if (searchIntoSub && !NodeCursorStack.empty()) + { + do { + if (!NodeCursorStack.empty()) + { + NodeCursor = NodeCursorStack.top(); + NodeCursorStack.pop(); + Position.goUp(); + } else + NodeCursor = NULL; + } while ((NodeCursor != NULL) && (NodeCursor->getNext() == NULL)); + if (NodeCursor != NULL) + { + if (NodeCursor->getNext() != NULL) + { + NodeCursor = NodeCursor->getNext(); + nodeID = NodeCursor->getIdent(); + /* check for special case: do not count "included template" nodes? */ + if ((NodeCursor->getValueType() != DSRTypes::VT_includedTemplate) || !(Position.getFlags() & DSRTypes::PF_dontCountIncludedTemplateNodes)) + ++Position; + } + } + } + } + return nodeID; +} diff --git a/dcmsr/libsrc/dsrnumtn.cc b/dcmsr/libsrc/dsrnumtn.cc index a6b296fb..5ff754b8 100644 --- a/dcmsr/libsrc/dsrnumtn.cc +++ b/dcmsr/libsrc/dsrnumtn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -47,6 +47,32 @@ DSRNumTreeNode::~DSRNumTreeNode() } +OFBool DSRNumTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRNumericMeasurementValue::operator==(*OFstatic_cast(const DSRNumericMeasurementValue *, OFstatic_cast(const DSRNumTreeNode *, &node))); + } + return result; +} + + +OFBool DSRNumTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRNumericMeasurementValue::operator!=(*OFstatic_cast(const DSRNumericMeasurementValue *, OFstatic_cast(const DSRNumTreeNode *, &node))); + } + return result; +} + + DSRNumTreeNode *DSRNumTreeNode::clone() const { return new DSRNumTreeNode(*this); diff --git a/dcmsr/libsrc/dsrnumvl.cc b/dcmsr/libsrc/dsrnumvl.cc index 07fc3a75..16ac030c 100644 --- a/dcmsr/libsrc/dsrnumvl.cc +++ b/dcmsr/libsrc/dsrnumvl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -117,6 +117,24 @@ DSRNumericMeasurementValue &DSRNumericMeasurementValue::operator=(const DSRNumer } +OFBool DSRNumericMeasurementValue::operator==(const DSRNumericMeasurementValue &numericMeasurement) const +{ + /* only the basic information is used for comparing the two values */ + return (NumericValue == numericMeasurement.NumericValue) && + (MeasurementUnit == numericMeasurement.MeasurementUnit) && + (ValueQualifier == numericMeasurement.ValueQualifier); +} + + +OFBool DSRNumericMeasurementValue::operator!=(const DSRNumericMeasurementValue &numericMeasurement) const +{ + /* only the basic information is used for comparing the two values */ + return (NumericValue != numericMeasurement.NumericValue) || + (MeasurementUnit != numericMeasurement.MeasurementUnit) || + (ValueQualifier != numericMeasurement.ValueQualifier); +} + + void DSRNumericMeasurementValue::clear() { NumericValue.clear(); diff --git a/dcmsr/libsrc/dsrpnmtn.cc b/dcmsr/libsrc/dsrpnmtn.cc index ff9b5769..813079b8 100644 --- a/dcmsr/libsrc/dsrpnmtn.cc +++ b/dcmsr/libsrc/dsrpnmtn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -59,6 +59,32 @@ DSRPNameTreeNode::~DSRPNameTreeNode() } +OFBool DSRPNameTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator==(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRPNameTreeNode *, &node))); + } + return result; +} + + +OFBool DSRPNameTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator!=(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRPNameTreeNode *, &node))); + } + return result; +} + + DSRPNameTreeNode *DSRPNameTreeNode::clone() const { return new DSRPNameTreeNode(*this); diff --git a/dcmsr/libsrc/dsrprdcc.cc b/dcmsr/libsrc/dsrprdcc.cc new file mode 100644 index 00000000..e9cea185 --- /dev/null +++ b/dcmsr/libsrc/dsrprdcc.cc @@ -0,0 +1,137 @@ +/* + * + * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmsr + * + * Author: Joerg Riesmeier + * + * Purpose: + * classes: DSRPatientRadiationDoseSRConstraintChecker + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsrprdcc.h" + + +DSRPatientRadiationDoseSRConstraintChecker::DSRPatientRadiationDoseSRConstraintChecker() + : DSRIODConstraintChecker() +{ +} + + +DSRPatientRadiationDoseSRConstraintChecker::~DSRPatientRadiationDoseSRConstraintChecker() +{ +} + + +OFBool DSRPatientRadiationDoseSRConstraintChecker::isByReferenceAllowed() const +{ + return OFFalse; +} + + +OFBool DSRPatientRadiationDoseSRConstraintChecker::isTemplateSupportRequired() const +{ + return OFTrue; +} + + +OFCondition DSRPatientRadiationDoseSRConstraintChecker::getRootTemplateIdentification(OFString &templateIdentifier, + OFString &mappingResource) const +{ + /* tbc: According to PS 3.3 "The document shall be constructed from _Baseline_ TID 10030..." */ + templateIdentifier = "10030"; + mappingResource = "DCMR"; + return EC_Normal; +} + + +DSRTypes::E_DocumentType DSRPatientRadiationDoseSRConstraintChecker::getDocumentType() const +{ + return DT_PatientRadiationDoseSR; +} + + +OFBool DSRPatientRadiationDoseSRConstraintChecker::checkContentRelationship(const E_ValueType sourceValueType, + const E_RelationshipType relationshipType, + const E_ValueType targetValueType, + const OFBool byReference) const +{ + /* the following code implements the constraints of table A.35.18-2 in DICOM PS3.3 */ + OFBool result = OFFalse; + /* by-reference relationships not allowed at all */ + if (!byReference) + { + /* row 1 of the table */ + if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container); + } + /* row 2 of the table */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_DateTime) || (targetValueType == VT_Code) || (targetValueType == VT_Text) || + (targetValueType == VT_UIDRef) || (targetValueType == VT_PName); + } + /* row 3 of the table */ + else if ((relationshipType == RT_hasObsContext) && + ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) || (sourceValueType == VT_Composite))) + { + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Composite); + } + /* row 4 of the table */ + else if ((relationshipType == RT_hasAcqContext) && + ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || (sourceValueType == VT_Composite))) + { + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Container); + } + /* row 5 of the table */ + else if (relationshipType == RT_hasConceptMod) + { + result = (targetValueType == VT_Text) || (targetValueType == VT_Code); + } + /* row 6 the table */ + else if ((relationshipType == RT_hasProperties) && + ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) || (sourceValueType == VT_Composite))) + { + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container); + } + /* row 7 of the table */ + else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName)) + { + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || + (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || + (targetValueType == VT_PName); + } + /* row 8 of the table */ + else if ((relationshipType == RT_inferredFrom) && + ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) + { + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Image) || + (targetValueType == VT_Composite) || (targetValueType == VT_Container); + } + } + return result; +} diff --git a/dcmsr/libsrc/dsrrtpl.cc b/dcmsr/libsrc/dsrrtpl.cc index 19405d79..28d5126a 100644 --- a/dcmsr/libsrc/dsrrtpl.cc +++ b/dcmsr/libsrc/dsrrtpl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -91,9 +91,28 @@ const DSRDocumentTree &DSRRootTemplate::getTree() } -OFCondition DSRRootTemplate::insertTemplate(const DSRSubTemplate &subTemplate, - const E_AddMode addMode, - const E_RelationshipType defaultRelType) +OFCondition DSRRootTemplate::addExtraContentItem(const E_RelationshipType relationshipType, + const E_ValueType valueType, + const E_AddMode addMode) +{ + OFCondition result = SR_EC_NonExtensibleTemplate; + /* check whether this template is extensible */ + if (isExtensible()) + { + /* call the function doing the real work */ + if (addContentItem(relationshipType, valueType, addMode) > 0) + result = EC_Normal; + else + result = SR_EC_CannotAddContentItem; + } + return result; +} + + + +OFCondition DSRRootTemplate::insertExtraTemplate(const DSRSubTemplate &subTemplate, + const E_AddMode addMode, + const E_RelationshipType defaultRelType) { OFCondition result = SR_EC_NonExtensibleTemplate; /* check whether this template is extensible */ diff --git a/dcmsr/libsrc/dsrscotn.cc b/dcmsr/libsrc/dsrscotn.cc index a546c189..29a49b22 100644 --- a/dcmsr/libsrc/dsrscotn.cc +++ b/dcmsr/libsrc/dsrscotn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -47,6 +47,32 @@ DSRSCoordTreeNode::~DSRSCoordTreeNode() } +OFBool DSRSCoordTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRSpatialCoordinatesValue::operator==(*OFstatic_cast(const DSRSpatialCoordinatesValue *, OFstatic_cast(const DSRSCoordTreeNode *, &node))); + } + return result; +} + + +OFBool DSRSCoordTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRSpatialCoordinatesValue::operator!=(*OFstatic_cast(const DSRSpatialCoordinatesValue *, OFstatic_cast(const DSRSCoordTreeNode *, &node))); + } + return result; +} + + DSRSCoordTreeNode *DSRSCoordTreeNode::clone() const { return new DSRSCoordTreeNode(*this); diff --git a/dcmsr/libsrc/dsrscovl.cc b/dcmsr/libsrc/dsrscovl.cc index 1017a430..367f2595 100644 --- a/dcmsr/libsrc/dsrscovl.cc +++ b/dcmsr/libsrc/dsrscovl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -68,6 +68,22 @@ DSRSpatialCoordinatesValue &DSRSpatialCoordinatesValue::operator=(const DSRSpati } +OFBool DSRSpatialCoordinatesValue::operator==(const DSRSpatialCoordinatesValue &coordinatesValue) const +{ + return (GraphicType == coordinatesValue.GraphicType) && + (GraphicDataList == coordinatesValue.GraphicDataList) && + (FiducialUID == coordinatesValue.FiducialUID); +} + + +OFBool DSRSpatialCoordinatesValue::operator!=(const DSRSpatialCoordinatesValue &coordinatesValue) const +{ + return (GraphicType != coordinatesValue.GraphicType) || + (GraphicDataList != coordinatesValue.GraphicDataList) || + (FiducialUID != coordinatesValue.FiducialUID); +} + + void DSRSpatialCoordinatesValue::clear() { GraphicType = DSRTypes::GT_invalid; diff --git a/dcmsr/libsrc/dsrstpl.cc b/dcmsr/libsrc/dsrstpl.cc index 16417f0d..4f1f95cb 100644 --- a/dcmsr/libsrc/dsrstpl.cc +++ b/dcmsr/libsrc/dsrstpl.cc @@ -88,9 +88,27 @@ const DSRDocumentSubTree &DSRSubTemplate::getTree() } -OFCondition DSRSubTemplate::insertTemplate(const DSRSubTemplate &subTemplate, - const E_AddMode addMode, - const E_RelationshipType defaultRelType) +OFCondition DSRSubTemplate::addExtraContentItem(const E_RelationshipType relationshipType, + const E_ValueType valueType, + const E_AddMode addMode) +{ + OFCondition result = SR_EC_NonExtensibleTemplate; + /* check whether this template is extensible */ + if (isExtensible()) + { + /* call the function doing the real work */ + if (addContentItem(relationshipType, valueType, addMode) > 0) + result = EC_Normal; + else + result = SR_EC_CannotAddContentItem; + } + return result; +} + + +OFCondition DSRSubTemplate::insertExtraTemplate(const DSRSubTemplate &subTemplate, + const E_AddMode addMode, + const E_RelationshipType defaultRelType) { OFCondition result = SR_EC_NonExtensibleTemplate; /* check whether this template is extensible */ diff --git a/dcmsr/libsrc/dsrstrvl.cc b/dcmsr/libsrc/dsrstrvl.cc index dbe9b789..1f9ac494 100644 --- a/dcmsr/libsrc/dsrstrvl.cc +++ b/dcmsr/libsrc/dsrstrvl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -62,6 +62,18 @@ DSRStringValue &DSRStringValue::operator=(const DSRStringValue &stringValue) } +OFBool DSRStringValue::operator==(const DSRStringValue &stringValue) const +{ + return (Value == stringValue.Value); +} + + +OFBool DSRStringValue::operator!=(const DSRStringValue &stringValue) const +{ + return (Value != stringValue.Value); +} + + void DSRStringValue::clear() { Value.clear(); diff --git a/dcmsr/libsrc/dsrtcotn.cc b/dcmsr/libsrc/dsrtcotn.cc index 3f6d707d..9affeab1 100644 --- a/dcmsr/libsrc/dsrtcotn.cc +++ b/dcmsr/libsrc/dsrtcotn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -47,6 +47,32 @@ DSRTCoordTreeNode::~DSRTCoordTreeNode() } +OFBool DSRTCoordTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRTemporalCoordinatesValue::operator==(*OFstatic_cast(const DSRTemporalCoordinatesValue *, OFstatic_cast(const DSRTCoordTreeNode *, &node))); + } + return result; +} + + +OFBool DSRTCoordTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRTemporalCoordinatesValue::operator!=(*OFstatic_cast(const DSRTemporalCoordinatesValue *, OFstatic_cast(const DSRTCoordTreeNode *, &node))); + } + return result; +} + + DSRTCoordTreeNode *DSRTCoordTreeNode::clone() const { return new DSRTCoordTreeNode(*this); diff --git a/dcmsr/libsrc/dsrtcovl.cc b/dcmsr/libsrc/dsrtcovl.cc index adbb5ea2..e65633ee 100644 --- a/dcmsr/libsrc/dsrtcovl.cc +++ b/dcmsr/libsrc/dsrtcovl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -71,6 +71,24 @@ DSRTemporalCoordinatesValue &DSRTemporalCoordinatesValue::operator=(const DSRTem } +OFBool DSRTemporalCoordinatesValue::operator==(const DSRTemporalCoordinatesValue &coordinatesValue) const +{ + return (TemporalRangeType == coordinatesValue.TemporalRangeType) && + (SamplePositionList == coordinatesValue.SamplePositionList) && + (TimeOffsetList == coordinatesValue.TimeOffsetList) && + (DateTimeList == coordinatesValue.DateTimeList); +} + + +OFBool DSRTemporalCoordinatesValue::operator!=(const DSRTemporalCoordinatesValue &coordinatesValue) const +{ + return (TemporalRangeType != coordinatesValue.TemporalRangeType) || + (SamplePositionList != coordinatesValue.SamplePositionList) || + (TimeOffsetList != coordinatesValue.TimeOffsetList) || + (DateTimeList != coordinatesValue.DateTimeList); +} + + void DSRTemporalCoordinatesValue::clear() { TemporalRangeType = DSRTypes::TRT_invalid; diff --git a/dcmsr/libsrc/dsrtextn.cc b/dcmsr/libsrc/dsrtextn.cc index eebae332..8a1696d7 100644 --- a/dcmsr/libsrc/dsrtextn.cc +++ b/dcmsr/libsrc/dsrtextn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,6 +60,32 @@ DSRTextTreeNode::~DSRTextTreeNode() } +OFBool DSRTextTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator==(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRTextTreeNode *, &node))); + } + return result; +} + + +OFBool DSRTextTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator!=(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRTextTreeNode *, &node))); + } + return result; +} + + DSRTextTreeNode *DSRTextTreeNode::clone() const { return new DSRTextTreeNode(*this); diff --git a/dcmsr/libsrc/dsrtimtn.cc b/dcmsr/libsrc/dsrtimtn.cc index a75432e5..47f62618 100644 --- a/dcmsr/libsrc/dsrtimtn.cc +++ b/dcmsr/libsrc/dsrtimtn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -59,6 +59,32 @@ DSRTimeTreeNode::~DSRTimeTreeNode() } +OFBool DSRTimeTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator==(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRTimeTreeNode *, &node))); + } + return result; +} + + +OFBool DSRTimeTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator!=(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRTimeTreeNode *, &node))); + } + return result; +} + + DSRTimeTreeNode *DSRTimeTreeNode::clone() const { return new DSRTimeTreeNode(*this); diff --git a/dcmsr/libsrc/dsrtypes.cc b/dcmsr/libsrc/dsrtypes.cc index f9218eec..5f8b9ee1 100644 --- a/dcmsr/libsrc/dsrtypes.cc +++ b/dcmsr/libsrc/dsrtypes.cc @@ -56,6 +56,7 @@ #include "dcmtk/dcmsr/dsrrrdcc.h" #include "dcmtk/dcmsr/dsracqcc.h" #include "dcmtk/dcmsr/dsrsaecc.h" +#include "dcmtk/dcmsr/dsrprdcc.h" #include "dcmtk/dcmdata/dcuid.h" #include "dcmtk/dcmdata/dcvrda.h" @@ -907,7 +908,7 @@ DSRTypes::E_CharacterSet DSRTypes::definedTermToCharacterSet(const OFString &def OFBool DSRTypes::isDocumentTypeSupported(const E_DocumentType documentType) { - return (documentType != DT_invalid) && (documentType != DT_ExtensibleSR) && (documentType != DT_PatientRadiationDoseSR); + return (documentType != DT_invalid) && (documentType != DT_ExtensibleSR); } @@ -1495,7 +1496,7 @@ DSRIODConstraintChecker *DSRTypes::createIODConstraintChecker(const E_DocumentTy checker = new DSRSimplifiedAdultEchoSRConstraintChecker(); break; case DT_PatientRadiationDoseSR: - /* not yet supported */ + checker = new DSRPatientRadiationDoseSRConstraintChecker(); break; case DT_invalid: /* nothing to do */ diff --git a/dcmsr/libsrc/dsruidtn.cc b/dcmsr/libsrc/dsruidtn.cc index 97e50a4f..522b03eb 100644 --- a/dcmsr/libsrc/dsruidtn.cc +++ b/dcmsr/libsrc/dsruidtn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -59,6 +59,32 @@ DSRUIDRefTreeNode::~DSRUIDRefTreeNode() } +OFBool DSRUIDRefTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator==(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRUIDRefTreeNode *, &node))); + } + return result; +} + + +OFBool DSRUIDRefTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRStringValue::operator!=(*OFstatic_cast(const DSRStringValue *, OFstatic_cast(const DSRUIDRefTreeNode *, &node))); + } + return result; +} + + DSRUIDRefTreeNode *DSRUIDRefTreeNode::clone() const { return new DSRUIDRefTreeNode(*this); diff --git a/dcmsr/libsrc/dsrwavtn.cc b/dcmsr/libsrc/dsrwavtn.cc index 141e6a47..c7bb57cc 100644 --- a/dcmsr/libsrc/dsrwavtn.cc +++ b/dcmsr/libsrc/dsrwavtn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -49,6 +49,32 @@ DSRWaveformTreeNode::~DSRWaveformTreeNode() } +OFBool DSRWaveformTreeNode::operator==(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator==(node); + if (result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRWaveformReferenceValue::operator==(*OFstatic_cast(const DSRWaveformReferenceValue *, OFstatic_cast(const DSRWaveformTreeNode *, &node))); + } + return result; +} + + +OFBool DSRWaveformTreeNode::operator!=(const DSRDocumentTreeNode &node) const +{ + /* call comparison operator of base class (includes check of value type) */ + OFBool result = DSRDocumentTreeNode::operator!=(node); + if (!result) + { + /* it's safe to cast the type since the value type has already been checked */ + result = DSRWaveformReferenceValue::operator!=(*OFstatic_cast(const DSRWaveformReferenceValue *, OFstatic_cast(const DSRWaveformTreeNode *, &node))); + } + return result; +} + + DSRWaveformTreeNode *DSRWaveformTreeNode::clone() const { return new DSRWaveformTreeNode(*this); diff --git a/dcmsr/libsrc/dsrwavvl.cc b/dcmsr/libsrc/dsrwavvl.cc index 9d986474..61170086 100644 --- a/dcmsr/libsrc/dsrwavvl.cc +++ b/dcmsr/libsrc/dsrwavvl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -69,6 +69,20 @@ DSRWaveformReferenceValue &DSRWaveformReferenceValue::operator=(const DSRWavefor } +OFBool DSRWaveformReferenceValue::operator==(const DSRWaveformReferenceValue &referenceValue) const +{ + return DSRCompositeReferenceValue::operator==(referenceValue) && + (ChannelList == referenceValue.ChannelList); +} + + +OFBool DSRWaveformReferenceValue::operator!=(const DSRWaveformReferenceValue &referenceValue) const +{ + return DSRCompositeReferenceValue::operator!=(referenceValue) || + (ChannelList != referenceValue.ChannelList); +} + + void DSRWaveformReferenceValue::clear() { DSRCompositeReferenceValue::clear(); @@ -247,7 +261,7 @@ OFCondition DSRWaveformReferenceValue::checkSOPClassUID(const OFString &sopClass OFCondition result = DSRCompositeReferenceValue::checkSOPClassUID(sopClassUID); if (result.good()) { - /* check for all valid/known SOP classes (according to DICOM PS 3.6-2015c) */ + /* check for all valid/known SOP classes (according to DICOM PS 3.6-2017e) */ if ((sopClassUID != UID_TwelveLeadECGWaveformStorage) && (sopClassUID != UID_GeneralECGWaveformStorage) && (sopClassUID != UID_AmbulatoryECGWaveformStorage) && diff --git a/dcmsr/tests/Makefile.dep b/dcmsr/tests/Makefile.dep index 0db80f88..76284f81 100644 --- a/dcmsr/tests/Makefile.dep +++ b/dcmsr/tests/Makefile.dep @@ -65,7 +65,11 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -83,14 +87,12 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ - ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ ../include/dcmtk/dcmsr/codes/ucum.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -115,7 +117,6 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ - ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \ @@ -251,7 +252,11 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -269,14 +274,12 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ - ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ ../include/dcmtk/dcmsr/dsrnumtn.h ../include/dcmtk/dcmsr/codes/dcm.h \ ../include/dcmtk/dcmsr/codes/srt.h ../include/dcmtk/dcmsr/codes/ucum.h \ @@ -304,12 +307,14 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/cmr/tid1411.h \ ../include/dcmtk/dcmsr/cmr/srnumvlu.h \ ../include/dcmtk/dcmsr/cmr/srnumvl.h \ - ../include/dcmtk/dcmsr/cmr/tid1600.h \ - ../include/dcmtk/dcmsr/cmr/cid4021.h ../include/dcmtk/dcmsr/cmr/cid100.h \ + ../include/dcmtk/dcmsr/cmr/tid1419m.h \ ../include/dcmtk/dcmsr/cmr/cid6147.h \ - ../include/dcmtk/dcmsr/cmr/cid7021.h \ ../include/dcmtk/dcmsr/cmr/cid7464.h \ - ../include/dcmtk/dcmsr/cmr/cid7469.h + ../include/dcmtk/dcmsr/cmr/cid7469.h \ + ../include/dcmtk/dcmsr/cmr/tid1501.h ../include/dcmtk/dcmsr/cmr/tid300.h \ + ../include/dcmtk/dcmsr/cmr/tid1600.h \ + ../include/dcmtk/dcmsr/cmr/cid4021.h ../include/dcmtk/dcmsr/cmr/cid100.h \ + ../include/dcmtk/dcmsr/cmr/cid7021.h tsrcodvl.o: tsrcodvl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -445,7 +450,11 @@ tsrdoc.o: tsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -463,14 +472,12 @@ tsrdoc.o: tsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ - ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h tsrdoctr.o: tsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ @@ -541,7 +548,11 @@ tsrdoctr.o: tsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -559,18 +570,16 @@ tsrdoctr.o: tsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ - ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ ../include/dcmtk/dcmsr/dsrtpltn.h ../include/dcmtk/dcmsr/dsrstpl.h \ - ../include/dcmtk/dcmsr/dsrnumtn.h ../include/dcmtk/dcmsr/dsrtextn.h \ - ../include/dcmtk/dcmsr/dsrstrvl.h + ../include/dcmtk/dcmsr/dsrimgtn.h ../include/dcmtk/dcmsr/dsrnumtn.h \ + ../include/dcmtk/dcmsr/dsrtextn.h ../include/dcmtk/dcmsr/dsrstrvl.h tsrlist.o: tsrlist.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -761,7 +770,11 @@ tsrtpl.o: tsrtpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ - ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ + ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdnflt.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmsr/dsritcsr.h ../include/dcmtk/dcmsr/dsrcitem.h \ ../include/dcmtk/dcmsr/dsrnumvl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \ @@ -779,14 +792,12 @@ tsrtpl.o: tsrtpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ - ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ ../include/dcmtk/dcmsr/dsrstpl.h ../include/dcmtk/dcmsr/dsrreftn.h tsrtree.o: tsrtree.cc ../../config/include/dcmtk/config/osconfig.h \ diff --git a/dcmsr/tests/tests.cc b/dcmsr/tests/tests.cc index 09785e2f..8dd27346 100644 --- a/dcmsr/tests/tests.cc +++ b/dcmsr/tests/tests.cc @@ -40,11 +40,15 @@ OFTEST_REGISTER(dcmsr_assignTree); OFTEST_REGISTER(dcmsr_cloneSubTree_1); OFTEST_REGISTER(dcmsr_cloneSubTree_2); OFTEST_REGISTER(dcmsr_extractSubTree); +OFTEST_REGISTER(dcmsr_gotoParentUntilRoot); OFTEST_REGISTER(dcmsr_gotoAnnotatedTreeNode); OFTEST_REGISTER(dcmsr_addContentItem_1); OFTEST_REGISTER(dcmsr_addContentItem_2); OFTEST_REGISTER(dcmsr_copyContentItem); OFTEST_REGISTER(dcmsr_getCurrentNode); +OFTEST_REGISTER(dcmsr_compareNodes); +OFTEST_REGISTER(dcmsr_gotoNodeByValue); +OFTEST_REGISTER(dcmsr_gotoMatchingNode); OFTEST_REGISTER(dcmsr_gotoNamedNode); OFTEST_REGISTER(dcmsr_gotoNamedChildNode); OFTEST_REGISTER(dcmsr_gotoNamedNodeInSubTree); @@ -67,6 +71,7 @@ OFTEST_REGISTER(dcmsr_setDocumentTree); OFTEST_REGISTER(dcmsr_rootTemplate); OFTEST_REGISTER(dcmsr_subTemplate_1); OFTEST_REGISTER(dcmsr_subTemplate_2); +OFTEST_REGISTER(dcmsr_subTemplate_3); OFTEST_REGISTER(dcmsr_createExpandedTree); OFTEST_REGISTER(dcmsr_templateWithByReferenceRelationship_1); OFTEST_REGISTER(dcmsr_templateWithByReferenceRelationship_2); @@ -86,7 +91,9 @@ OFTEST_REGISTER(dcmsr_CID10013e_CTAcquisitionType); OFTEST_REGISTER(dcmsr_CID10033e_CTReconstructionAlgorithm); OFTEST_REGISTER(dcmsr_TID1001_ObservationContext); OFTEST_REGISTER(dcmsr_TID1204_LanguageOfContentItemAndDescendants); +OFTEST_REGISTER(dcmsr_TID1411_VolumetricROIMeasurements); OFTEST_REGISTER(dcmsr_TID1500_MeasurementReport); +OFTEST_REGISTER(dcmsr_TID1501_MeasurementGroup); OFTEST_REGISTER(dcmsr_TID1600_ImageLibrary); OFTEST_REGISTER(dcmsr_CMR_SRNumericMeasurementValue); OFTEST_REGISTER(dcmsr_CMR_SRNumericMeasurementValueWithUnits_baselineGroup); diff --git a/dcmsr/tests/tsrcmr.cc b/dcmsr/tests/tsrcmr.cc index 0cb2efd0..64f5381e 100644 --- a/dcmsr/tests/tsrcmr.cc +++ b/dcmsr/tests/tsrcmr.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -221,6 +221,47 @@ OFTEST(dcmsr_TID1204_LanguageOfContentItemAndDescendants) } +OFTEST(dcmsr_TID1411_VolumetricROIMeasurements) +{ + CMR_TID1411_in_TID1500 volumetric; + /* create a new volumetric measurements object and set the mandatory values */ + OFCHECK(volumetric.setTrackingIdentifier("tracking").good()); + OFCHECK(volumetric.setTrackingUniqueIdentifier("1.2.3.4.5").good()); + OFCHECK(volumetric.setTimePoint("1").good()); + OFCHECK(volumetric.hasMeasurementGroup()); + OFCHECK(volumetric.hasTrackingIdentifier()); + OFCHECK(volumetric.hasTrackingUniqueIdentifier()); + /* the measurement is still missing */ + OFCHECK(!volumetric.hasMeasurements()); + OFCHECK(!volumetric.isValid()); + /* do more sophisticated tests */ + CMR_TID1419_in_TID1411_in_TID1500 &measurement = volumetric.getMeasurement(); + OFCHECK(volumetric.addFindingSite(DSRBasicCodedEntry("EFGH", "99TEST", "Finding Site"), CMR_CID244::RightAndLeft).good()); + OFCHECK(!volumetric.hasMeasurements()); + OFCHECK(!measurement.hasMeasurement()); + OFCHECK(measurement.createNewMeasurement(CMR_CID7469::Volume, CMR_TID1411_in_TID1500::MeasurementValue("15", CMR_CID7181::CubicMillimeter)).good()); + OFCHECK(volumetric.hasMeasurements()); + OFCHECK(measurement.hasMeasurement()); + OFCHECK(measurement.setDerivation(CMR_CID7464::StandardDeviation).good()); + OFCHECK(measurement.addModifier(DSRBasicCodedEntry("ABCD", "99TEST", "Concept Name Modifier"), DSRBasicCodedEntry("ABCD.1", "99TEST", "Modifier 1")).good()); + OFCHECK(measurement.addFindingSite(DSRBasicCodedEntry("EFGH.1", "99TEST", "Finding Site 1"), CMR_CID244::Left).good()); + OFCHECK(measurement.addModifier(DSRBasicCodedEntry("ABCD", "99TEST", "Concept Name Modifier"), DSRBasicCodedEntry("ABCD.2", "99TEST", "Modifier 2")).good()); + OFCHECK(measurement.setMeasurementMethod(DSRCodedEntryValue("9876", "99TEST", "Some method")).good()); + OFCHECK(measurement.setRealWorldValueMap(DSRCompositeReferenceValue(UID_RealWorldValueMappingStorage, "2.0.3.0.4.0")).good()); + OFCHECK(measurement.addFindingSite(DSRBasicCodedEntry("EFGH.2", "99TEST", "Finding Site 2"), CID244e_Laterality(), DSRBasicCodedEntry("EFGH.2-1", "99TEST", "Finding Site 2 Modifier")).good()); + OFCHECK(measurement.setEquivalentMeaningOfConceptName("blabla").good()); + OFCHECK(measurement.addDerivationParameter(CODE_DCM_Derivation, CMR_SRNumericMeasurementValue("1.5", CODE_UCUM_Centimeter)).good()); + OFCHECK(volumetric.addQualitativeEvaluation(CODE_DCM_Conclusion, "it's not ok").good()); + + /* output content of the tree (in debug mode only) */ + if (DCM_dcmsrCmrLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) + { + volumetric.print(COUT, DSRTypes::PF_printTemplateIdentification | DSRTypes::PF_printAllCodes | DSRTypes::PF_printSOPInstanceUID | + DSRTypes::PF_printNodeID | DSRTypes::PF_printAnnotation | DSRTypes::PF_printLongSOPClassName); + } +} + + OFTEST(dcmsr_TID1500_MeasurementReport) { TID1500_MeasurementReport report(CMR_CID7021::ImagingMeasurementReport); @@ -250,26 +291,31 @@ OFTEST(dcmsr_TID1500_MeasurementReport) /* some further checks */ OFCHECK(report.hasImagingMeasurements()); OFCHECK(report.hasVolumetricROIMeasurements()); + OFCHECK(report.hasIndividualMeasurements()); OFCHECK(!report.hasQualitativeEvaluations()); OFCHECK(!report.hasImagingMeasurements(OFTrue /*checkChildren*/)); OFCHECK(!report.hasVolumetricROIMeasurements(OFTrue /*checkChildren*/)); + OFCHECK(!report.hasIndividualMeasurements(OFTrue /*checkChildren*/)); OFCHECK(!report.hasQualitativeEvaluations(OFTrue /*checkChildren*/)); /* add two further volumetric ROI measurements */ OFCHECK(report.addVolumetricROIMeasurements().good()); - OFCHECK(report.addVolumetricROIMeasurements().good()); + OFCHECK(report.addVolumetricROIMeasurements(OFFalse /*checkEmpty*/).good()); OFCHECK(!report.hasVolumetricROIMeasurements(OFTrue /*checkChildren*/)); + OFCHECK(report.getVolumetricROIMeasurements().setTrackingUniqueIdentifier("1.2.3.4.5").good()); + OFCHECK(report.hasVolumetricROIMeasurements(OFTrue /*checkChildren*/)); + OFCHECK(report.addVolumetricROIMeasurements().good()); /* fill volumetric ROI measurements with data */ - TID1500_MeasurementReport::TID1411_Measurements &measurements = report.getVolumetricROIMeasurements(); - OFCHECK(!measurements.isValid()); - OFCHECK(measurements.compareTemplateIdentication("1411", "DCMR")); - OFCHECK(measurements.setTrackingIdentifier("aorta reference region").good()); - OFCHECK(measurements.setTrackingUniqueIdentifier("1.2.3.4.5").good()); - OFCHECK(measurements.setTrackingIdentifier("some reference region").good()); - OFCHECK(measurements.setActivitySession("1").good()); - OFCHECK(measurements.setTimePoint("1.1").good()); - OFCHECK(measurements.setSourceSeriesForSegmentation("6.7.8.9.0").good()); - OFCHECK(measurements.setFinding(DSRBasicCodedEntry("0815", "99TEST", "Some test code")).good()); - OFCHECK(!measurements.isValid()); + TID1500_MeasurementReport::TID1411_Measurements &volMeasurements = report.getVolumetricROIMeasurements(); + OFCHECK(!volMeasurements.isValid()); + OFCHECK(volMeasurements.compareTemplateIdentication("1411", "DCMR")); + OFCHECK(volMeasurements.setTrackingIdentifier("aorta reference region").good()); + OFCHECK(volMeasurements.setTrackingUniqueIdentifier("1.2.3.4.5").good()); + OFCHECK(volMeasurements.setTrackingIdentifier("some reference region").good()); + OFCHECK(volMeasurements.setActivitySession("1").good()); + OFCHECK(volMeasurements.setTimePoint("1.1").good()); + OFCHECK(volMeasurements.setSourceSeriesForSegmentation("6.7.8.9.0").good()); + OFCHECK(volMeasurements.setFinding(DSRBasicCodedEntry("0815", "99TEST", "Some test code")).good()); + OFCHECK(!volMeasurements.isValid()); /* test two ways of adding a referenced segment */ DSRImageReferenceValue segment(UID_SegmentationStorage, "1.0.2.0.3.0"); segment.getSegmentList().addItem(1); @@ -284,47 +330,65 @@ OFTEST(dcmsr_TID1500_MeasurementReport) OFCHECK(ditem->putAndInsertString(DCM_TrackingID, "blabla").good()); OFCHECK(ditem->putAndInsertString(DCM_TrackingUID, "1.2.3").good()); } - OFCHECK(measurements.setReferencedSegment(segment).good()); - OFCHECK(measurements.setReferencedSegment(DSRImageReferenceValue(UID_SegmentationStorage, "1.0")).bad()); - OFCHECK(measurements.setReferencedSegment(dataset, 1).good()); + OFCHECK(volMeasurements.setReferencedSegment(segment).good()); + OFCHECK(volMeasurements.setReferencedSegment(DSRImageReferenceValue(UID_SegmentationStorage, "1.0")).bad()); + OFCHECK(volMeasurements.setReferencedSegment(dataset, 1).good()); dataset.clear(); OFCHECK(dataset.putAndInsertString(DCM_SOPClassUID, UID_RealWorldValueMappingStorage).good()); OFCHECK(dataset.putAndInsertString(DCM_SOPInstanceUID, "99.9").good()); - OFCHECK(measurements.setRealWorldValueMap(DSRCompositeReferenceValue(UID_RealWorldValueMappingStorage, "2.0.3.0.4.0")).good()); - OFCHECK(measurements.setRealWorldValueMap(DSRCompositeReferenceValue(UID_CTImageStorage, "2.0")).bad()); - OFCHECK(measurements.setRealWorldValueMap(dataset).good()); - OFCHECK(measurements.setFindingSite(CODE_SRT_AorticArch).good()); - OFCHECK(measurements.setMeasurementMethod(DSRCodedEntryValue(CODE_DCM_SUVBodyWeightCalculationMethod)).good()); - OFCHECK(!measurements.isValid()); + OFCHECK(volMeasurements.setRealWorldValueMap(DSRCompositeReferenceValue(UID_RealWorldValueMappingStorage, "2.0.3.0.4.0")).good()); + OFCHECK(volMeasurements.setRealWorldValueMap(DSRCompositeReferenceValue(UID_CTImageStorage, "2.0")).bad()); + OFCHECK(volMeasurements.setRealWorldValueMap(dataset).good()); + OFCHECK(volMeasurements.addFindingSite(CODE_SRT_AorticArch).good()); + OFCHECK(volMeasurements.setMeasurementMethod(DSRCodedEntryValue(CODE_DCM_SUVBodyWeightCalculationMethod)).good()); + OFCHECK(!volMeasurements.isValid()); /* add two measurement values */ const CMR_TID1411_in_TID1500::MeasurementValue numVal1("99", CMR_CID7181::StandardizedUptakeValueBodyWeight); const CMR_TID1411_in_TID1500::MeasurementValue numVal2(CMR_CID42::MeasurementFailure); - OFCHECK(measurements.addMeasurement(CMR_CID7469::SUVbw, numVal1, CMR_CID6147(), CMR_CID7464::Mean).good()); - OFCHECK(measurements.addMeasurement(CMR_CID7469::SUVbw, numVal2, DSRCodedEntryValue("0815", "99TEST", "Some test code"), CMR_CID7464::Mode).good()); - OFCHECK(measurements.isValid()); + OFCHECK(!volMeasurements.hasMeasurements()); + OFCHECK(volMeasurements.addMeasurement(CMR_CID7469::SUVbw, numVal1).good()); + OFCHECK(volMeasurements.getMeasurement().setDerivation(CMR_CID7464::Mean).good()); + OFCHECK(volMeasurements.addMeasurement(CMR_CID7469::SUVbw, numVal2).good()); + OFCHECK(volMeasurements.getMeasurement().setDerivation(CMR_CID7464::Mode).good()); + OFCHECK(volMeasurements.getMeasurement().setMeasurementMethod(DSRCodedEntryValue("0815", "99TEST", "Some test code")).good()); + OFCHECK(volMeasurements.hasMeasurements()); + OFCHECK(volMeasurements.isValid()); + /* also add an individual measurement */ + TID1500_MeasurementReport::TID1501_Measurements &linMeasurements = report.getIndividualMeasurements(); + OFCHECK(!linMeasurements.isValid()); + OFCHECK(linMeasurements.compareTemplateIdentication("1501", "DCMR")); + OFCHECK(linMeasurements.setTrackingIdentifier("aorta reference region").good()); + OFCHECK(linMeasurements.setTrackingUniqueIdentifier("1.2.3.4.5").good()); + const CMR_TID1501_in_TID1500::MeasurementValue numVal3("11", CMR_CID7181::Millimeter); + OFCHECK(linMeasurements.addMeasurement(CMR_CID7469::Distance, numVal3).good()); + OFCHECK(linMeasurements.addMeasurement(CMR_CID7469::Diameter, numVal3).good()); + /* now, add some qualitative evaluations */ const DSRCodedEntryValue code("1234", "99TEST", "not bad"); OFCHECK(report.addQualitativeEvaluation(DSRBasicCodedEntry("0815", "99TEST", "Some test code"), code).good()); OFCHECK(report.addQualitativeEvaluation(DSRBasicCodedEntry("4711", "99TEST", "Some other test code"), "very good").good()); + /* and, add another finding site (introduced with CP-1591) */ + OFCHECK(volMeasurements.addFindingSite(DSRCodedEntryValue("0815", "99TEST", "Some test code")).good()); /* some final checks */ OFCHECK(report.isValid()); OFCHECK(report.hasImagingMeasurements(OFTrue /*checkChildren*/)); OFCHECK(report.hasVolumetricROIMeasurements(OFTrue /*checkChildren*/)); + OFCHECK(report.hasIndividualMeasurements(OFTrue /*checkChildren*/)); OFCHECK(report.hasQualitativeEvaluations(OFTrue /*checkChildren*/)); /* check number of content items (expected) */ - OFCHECK_EQUAL(report.getTree().countNodes(), 13); - OFCHECK_EQUAL(report.getTree().countNodes(OFTrue /*searchIntoSubTemplates*/), 34); - OFCHECK_EQUAL(report.getTree().countNodes(OFTrue /*searchIntoSubTemplates*/, OFFalse /*countIncludedTemplateNodes*/), 28); + OFCHECK_EQUAL(report.getTree().countNodes(), 14); + OFCHECK_EQUAL(report.getTree().countNodes(OFTrue /*searchIntoSubTemplates*/), 48); + OFCHECK_EQUAL(report.getTree().countNodes(OFTrue /*searchIntoSubTemplates*/, OFFalse /*countIncludedTemplateNodes*/), 36); /* create an expanded version of the tree */ DSRDocumentSubTree *tree = NULL; OFCHECK(report.getTree().createExpandedSubTree(tree).good()); /* and check whether all content items are there */ if (tree != NULL) { - OFCHECK_EQUAL(tree->countNodes(), 28); - OFCHECK_EQUAL(tree->countNodes(OFTrue /*searchIntoSubTemplates*/), 28); - OFCHECK_EQUAL(tree->countNodes(OFTrue /*searchIntoSubTemplates*/, OFFalse /*countIncludedTemplateNodes*/), 28); + OFCHECK_EQUAL(tree->countNodes(), 36); + OFCHECK_EQUAL(tree->countNodes(OFTrue /*searchIntoSubTemplates*/), 36); + OFCHECK_EQUAL(tree->countNodes(OFTrue /*searchIntoSubTemplates*/, OFFalse /*countIncludedTemplateNodes*/), 36); delete tree; } else OFCHECK_FAIL("could create expanded tree"); @@ -350,6 +414,66 @@ OFTEST(dcmsr_TID1500_MeasurementReport) } +OFTEST(dcmsr_TID1501_MeasurementGroup) +{ + CMR_TID1501_in_TID1500 group; + /* create a new measurement group and set the mandatory values */ + OFCHECK(group.setTrackingIdentifier("tracking").good()); + OFCHECK(group.setTrackingUniqueIdentifier("1.2.3.4.5").good()); + OFCHECK(group.setTimePoint("1").good()); + OFCHECK(group.hasMeasurementGroup()); + OFCHECK(group.hasTrackingIdentifier()); + OFCHECK(group.hasTrackingUniqueIdentifier()); + /* the measurement is still missing */ + OFCHECK(!group.hasMeasurements()); + OFCHECK(!group.isValid()); + /* do more sophisticated tests, e.g. on TID 300 */ + CMR_TID300_in_TID1501_in_TID1500 &measurement = group.getMeasurement(); + OFCHECK(!group.hasMeasurements()); + OFCHECK(!measurement.hasMeasurement()); + OFCHECK(measurement.createNewMeasurement(CMR_CID7469::Distance, CMR_TID1501_in_TID1500::MeasurementValue("5", CMR_CID7181::Centimeter)).good()); + OFCHECK(group.hasMeasurements()); + OFCHECK(measurement.hasMeasurement()); + OFCHECK(group.isValid()); + OFCHECK(measurement.setDerivation(CMR_CID7464::StandardDeviation).good()); + OFCHECK(measurement.addModifier(DSRBasicCodedEntry("ABCD", "99TEST", "Concept Name Modifier"), DSRBasicCodedEntry("ABCD.1", "99TEST", "Modifier 1")).good()); + OFCHECK(measurement.addFindingSite(DSRBasicCodedEntry("EFGH.1", "99TEST", "Finding Site 1"), CMR_CID244::Left).good()); + OFCHECK(measurement.addModifier(DSRBasicCodedEntry("ABCD", "99TEST", "Concept Name Modifier"), DSRBasicCodedEntry("ABCD.2", "99TEST", "Modifier 2")).good()); + OFCHECK(measurement.setMeasurementMethod(DSRCodedEntryValue("9876", "99TEST", "Some method")).good()); + OFCHECK(measurement.setRealWorldValueMap(DSRCompositeReferenceValue(UID_RealWorldValueMappingStorage, "2.0.3.0.4.0")).good()); + OFCHECK(measurement.addFindingSite(DSRBasicCodedEntry("EFGH.2", "99TEST", "Finding Site 2"), CID244e_Laterality(), DSRBasicCodedEntry("EFGH.2-1", "99TEST", "Finding Site 2 Modifier")).good()); + OFCHECK(measurement.setEquivalentMeaningOfConceptName("blabla").good()); + OFCHECK(measurement.addDerivationParameter(CODE_DCM_Derivation, CMR_SRNumericMeasurementValue("1.5", CODE_UCUM_Centimeter)).good()); + OFCHECK(measurement.addImage(CODE_DCM_SourceImageForImageProcessingOperation, DSRImageReferenceValue(UID_CTImageStorage, "1.2.3.4")).good()); + DSRSpatialCoordinatesValue spatialCoord(DSRTypes::GT_Point); + spatialCoord.getGraphicDataList().addItem(100, 200); + OFCHECK(measurement.addSpatialCoordinates(CODE_DCM_SourceImageForImageProcessingOperation, spatialCoord, DSRImageReferenceValue(UID_CTImageStorage, "1.2.3.4")).good()); + OFCHECK(group.addQualitativeEvaluation(CODE_DCM_Conclusion, "it's ok").good()); + OFCHECK_EQUAL(group.countNodes(OFTrue /*searchIntoSubTemplates*/), 21); + /* add extra content items (TID 1501 is extensible) */ + OFCHECK(group.addExtraContentItem(DSRTypes::RT_contains, DSRTypes::VT_Container).good()); + OFCHECK(group.addExtraContentItem(DSRTypes::RT_contains, DSRTypes::VT_Text, DSRTypes::AM_belowCurrent).good()); + OFCHECK(group.getCurrentContentItem().setConceptName(CODE_DCM_Comment).good()); + OFCHECK(group.getCurrentContentItem().setStringValue("some extra stuff").good()); + OFCHECK(group.gotoAnnotatedNode("TID 1501 - Row 3") > 0); + OFCHECK(group.addExtraContentItem(DSRTypes::RT_hasObsContext, DSRTypes::VT_Code).good()); + OFCHECK(group.getCurrentContentItem().setConceptName(CODE_DCM_FindingObservationType).good()); + OFCHECK(group.getCurrentContentItem().setCodeValue(DSRBasicCodedEntry("0815", "99TEST", "Some test code")).good()); + OFCHECK_EQUAL(group.countNodes(OFTrue /*searchIntoSubTemplates*/), 24); + /* and, finally, change an existing template value and add a measurement */ + OFCHECK(group.setTrackingIdentifier("tracking #2").good()); + OFCHECK(group.addMeasurement(CMR_CID7469::Diameter, CMR_TID1501_in_TID1500::MeasurementValue("10", CMR_CID7181::Millimeter)).good()); + OFCHECK_EQUAL(group.countNodes(OFTrue /*searchIntoSubTemplates*/), 26); + + /* output content of the tree (in debug mode only) */ + if (DCM_dcmsrCmrLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) + { + group.print(COUT, DSRTypes::PF_printTemplateIdentification | DSRTypes::PF_printAllCodes | DSRTypes::PF_printSOPInstanceUID | + DSRTypes::PF_printNodeID | DSRTypes::PF_printAnnotation | DSRTypes::PF_printLongSOPClassName); + } +} + + OFTEST(dcmsr_TID1600_ImageLibrary) { TID1600_ImageLibrary library; @@ -415,11 +539,14 @@ OFTEST(dcmsr_TID1600_ImageLibrary) OFCHECK(DSRCodedEntryValue("4711b", "99TEST", "some even more strange modifier").writeSequenceItem(*item2, DCM_ViewModifierCodeSequence).good()); } /* add two image groups */ + TID1600_ImageLibrary::ConceptNameList descriptors; + descriptors.push_back(CODE_DCM_Modality); + descriptors.push_back(CODE_DCM_TargetRegion); OFCHECK(library.isValid()); OFCHECK(library.hasImageLibrary()); OFCHECK(library.addImageGroup().good()); - OFCHECK(library.addImageEntry(dataset1).good()); - OFCHECK(library.addImageEntryDescriptors(dataset1).good()); + OFCHECK(library.addImageEntry(dataset1, TID1600_ImageLibrary::withoutSelectedDescriptors, descriptors).good()); + OFCHECK(library.addImageGroupDescriptors(dataset1, TID1600_ImageLibrary::withSelectedDescriptors, descriptors).good()); OFCHECK(library.addImageGroup().good()); OFCHECK(library.addImageEntry(dataset2, TID1600_ImageLibrary::withAllDescriptors).good()); OFCHECK(library.setPETImageRadionuclide(CID4020_PETRadionuclide::_18_Fluorine).good()); @@ -431,15 +558,32 @@ OFTEST(dcmsr_TID1600_ImageLibrary) OFCHECK(library.setPETImageRadionuclide(CID4020_PETRadionuclide::_18_Fluorine).bad()); OFCHECK(library.addImageEntry(dataset3, TID1600_ImageLibrary::withoutDescriptors).good()); OFCHECK(library.addImageEntry(dataset4, TID1600_ImageLibrary::withAllDescriptors).good()); - OFCHECK(library.addImageEntryDescriptors(dataset3).good()); + /* the following two calls should fail */ + OFCHECK(library.addImageGroupDescriptors(dataset3, TID1600_ImageLibrary::withoutDescriptors).bad()); + OFCHECK(library.addImageGroupDescriptors(dataset3, TID1600_ImageLibrary::withSelectedDescriptors, TID1600_ImageLibrary::ConceptNameList()).bad()); + OFCHECK(library.addImageGroupDescriptors(dataset3, TID1600_ImageLibrary::withAllDescriptors).good()); /* check modality code of most recently added entry */ DSRCodedEntryValue modality; OFCHECK(library.getImageEntryModality(modality).good()); OFCHECK(modality == CODE_DCM_DigitalRadiography); /* try to add another invocation of TID 1602 */ - OFCHECK(library.addImageEntryDescriptors(dataset4).bad()); + OFCHECK(library.addImageGroupDescriptors(dataset4, TID1600_ImageLibrary::withAllDescriptors).bad()); + /* create another group for testing the "move common descriptors" method */ + OFCHECK(library.addImageGroup().good()); + OFCHECK(library.addImageEntry(dataset1, TID1600_ImageLibrary::withAllDescriptors).good()); + OFCHECK(dataset1.putAndInsertString(DCM_SOPInstanceUID, "1.2.3.4.5.6.7.8.9.10").good()); + OFCHECK(dataset1.putAndInsertString(DCM_PixelSpacing, "1.0\\1.0").good()); + OFCHECK(library.addImageEntry(dataset1, TID1600_ImageLibrary::withAllDescriptors).good()); + /* check number of expected content items */ - OFCHECK_EQUAL(library.countNodes(), 61); + OFCHECK_EQUAL(library.countNodes(), 100); + + /* move common descriptors to group level */ + OFCHECK(library.moveCommonImageDescriptorsToImageGroups() == EC_Normal); + OFCHECK(library.moveCommonImageDescriptorsToImageGroups() == CMR_EC_NoImageLibraryEntryDescriptorsToBeMoved); + + /* check number of expected content items (again) */ + OFCHECK_EQUAL(library.countNodes(), 84); /* output content of the tree (in debug mode only) */ if (DCM_dcmsrCmrLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) diff --git a/dcmsr/tests/tsrdoctr.cc b/dcmsr/tests/tsrdoctr.cc index 4942e249..edce1715 100644 --- a/dcmsr/tests/tsrdoctr.cc +++ b/dcmsr/tests/tsrdoctr.cc @@ -27,7 +27,9 @@ #include "dcmtk/ofstd/oftest.h" #include "dcmtk/dcmsr/dsrdoc.h" +#include "dcmtk/dcmsr/dsrdncsr.h" #include "dcmtk/dcmsr/dsrtpltn.h" +#include "dcmtk/dcmsr/dsrimgtn.h" #include "dcmtk/dcmsr/dsrnumtn.h" #include "dcmtk/dcmsr/dsrtextn.h" @@ -88,6 +90,10 @@ OFTEST(dcmsr_copyContentItem) DSRContentItem item(tree.getCurrentContentItem()); OFCHECK_EQUAL(item.getValueType(), DSRTypes::VT_Num); OFCHECK_EQUAL(item.getRelationshipType(), DSRTypes::RT_contains); + /* also check the comparison operator */ + OFCHECK(item == tree.getCurrentContentItem()); + OFCHECK(item.setNumericValue(DSRNumericMeasurementValue("1.5", DSRCodedEntryValue("cm", "UCUM", "centimeter"))).good()); + OFCHECK(item != tree.getCurrentContentItem()); /* clone the previous content item */ OFCHECK(tree.gotoPrevious() > 0); DSRDocumentTreeNode *treeNode = tree.cloneCurrentTreeNode(); @@ -128,6 +134,132 @@ OFTEST(dcmsr_getCurrentNode) } +OFTEST(dcmsr_compareNodes) +{ + /* first, create an image tree node */ + DSRImageTreeNode node(DSRTypes::RT_contains); + /* then, set its contents */ + OFCHECK(node.setValue(DSRImageReferenceValue(UID_CTImageStorage, "1.2.3.4")).good()); + node.getFrameList().addItem(1); + /* create a clone of this node */ + DSRImageTreeNode *newNode = node.clone(); + if (newNode != NULL) + { + /* and compare these nodes */ + OFCHECK(node == *newNode); + /* then add more information */ + node.getFrameList().addItem(2); + /* and compare the nodes again */ + OFCHECK(node != *newNode); + /* make them "equal" again */ + newNode->getFrameList().addItem(2); + OFCHECK(node == *newNode); + } + /* create an "incompatible" node */ + DSRNumTreeNode numNode(DSRTypes::RT_contains); + /* and compare it to the initial node */ + OFCHECK(numNode != node); + delete newNode; +} + + +OFTEST(dcmsr_gotoNodeByValue) +{ + /* first, create a new SR document */ + DSRDocument doc(DSRTypes::DT_ComprehensiveSR); + DSRDocumentTree &tree = doc.getTree(); + /* then add some content items */ + OFCHECK(tree.addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container)); + OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Text, DSRTypes::AM_belowCurrent)); + OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num, DSRTypes::AM_afterCurrent)); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")).good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasProperties, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent)); + const size_t nodeID1 = tree.getNodeID(); + const DSRDocumentTreeNode *node1 = tree.getCurrentNode(); + OFCHECK(tree.getCurrentContentItem().setObservationDateTime("201708080800").good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent)); + const size_t nodeID2 = tree.getNodeID(); + const DSRDocumentTreeNode *node2 = tree.getCurrentNode(); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("121206", "DCM", "Distance")).good()); + OFCHECK(tree.getCurrentContentItem().setObservationDateTime("201708081200").good()); + OFCHECK(tree.goUp() > 0); + OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num, DSRTypes::AM_afterCurrent)); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")).good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasProperties, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent)); + const size_t nodeID3 = tree.getNodeID(); + const DSRDocumentTreeNode *node3 = tree.getCurrentNode(); + OFCHECK(tree.getCurrentContentItem().setObservationDateTime("201708280800").good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent)); + const size_t nodeID4 = tree.getNodeID(); + const DSRDocumentTreeNode *node4 = tree.getCurrentNode(); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("121207", "DCM", "Height")).good()); + OFCHECK(tree.getCurrentContentItem().setObservationDateTime("201708280800").good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent)); + const size_t nodeID5 = tree.getNodeID(); + const DSRDocumentTreeNode *node5 = tree.getCurrentNode(); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("111221", "DCM", "Unknown failure")).good()); + /* and check the "search by value" function */ + OFCHECK_EQUAL(tree.gotoNode(*node1), nodeID1); + OFCHECK_EQUAL(tree.gotoNode(*node4), nodeID4); + OFCHECK_EQUAL(tree.gotoNode(*node2), nodeID2); + OFCHECK_EQUAL(tree.gotoNode(*node3, OFFalse /*startFromRoot*/), nodeID3); + OFCHECK_EQUAL(tree.gotoNode(*node5), nodeID5); +} + + +OFTEST(dcmsr_gotoMatchingNode) +{ + /* first, create a new SR document */ + DSRDocument doc(DSRTypes::DT_ComprehensiveSR); + DSRDocumentTree &tree = doc.getTree(); + /* then add some content items */ + OFCHECK(tree.addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container)); + OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Text, DSRTypes::AM_belowCurrent)); + OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num, DSRTypes::AM_afterCurrent)); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")).good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasProperties, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent)); + const size_t nodeID1 = tree.getNodeID(); + OFCHECK(tree.getCurrentContentItem().setObservationDateTime("201708080800").good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent)); + const size_t nodeID2 = tree.getNodeID(); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("121206", "DCM", "Distance")).good()); + OFCHECK(tree.getCurrentContentItem().setObservationDateTime("201708081200").good()); + OFCHECK(tree.goUp() > 0); + OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num, DSRTypes::AM_afterCurrent)); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")).good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasProperties, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent)); + const size_t nodeID3 = tree.getNodeID(); + OFCHECK(tree.getCurrentContentItem().setObservationDateTime("201708280800").good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent)); + const size_t nodeID4 = tree.getNodeID(); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("121207", "DCM", "Height")).good()); + OFCHECK(tree.getCurrentContentItem().setObservationDateTime("201708280800").good()); + OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent)); + const size_t nodeID5 = tree.getNodeID(); + OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("111221", "DCM", "Unknown failure")).good()); + /* and check the "search by filter" function */ + OFCHECK_EQUAL(tree.gotoMatchingNode(DSRDocumentTreeNodeConceptNameFilter(DSRCodedEntryValue("121206", "DCM", "Distance"))), nodeID2); + OFCHECK_EQUAL(tree.gotoNextMatchingNode(DSRDocumentTreeNodeValueTypeFilter(DSRTypes::VT_Code)), nodeID3); + OFCHECK_EQUAL(tree.gotoNextMatchingNode(DSRDocumentTreeNodeHasChildrenFilter(OFFalse /*hasChildren*/)), nodeID5); + DSRDocumentTreeNodeAndFilter filter1; + OFCHECK(filter1.addFilter(new DSRDocumentTreeNodeValueTypeFilter(DSRTypes::VT_Code)).good()); + OFCHECK(filter1.addFilter(new DSRDocumentTreeNodeRelationshipTypeFilter(DSRTypes::RT_hasConceptMod)).good()); + OFCHECK_EQUAL(tree.gotoMatchingNode(filter1, OFTrue /*startFromRoot*/), nodeID2); + OFCHECK_EQUAL(tree.gotoNextMatchingNode(filter1), nodeID4); + DSRDocumentTreeNodeOrFilter filter2; + OFCHECK(filter2.addFilter(new DSRDocumentTreeNodeValueTypeFilter(DSRTypes::VT_Code)).good()); + OFCHECK(filter2.addFilter(new DSRDocumentTreeNodeRelationshipTypeFilter(DSRTypes::RT_hasConceptMod)).good()); + OFCHECK_EQUAL(tree.gotoMatchingNode(filter2, OFTrue /*startFromRoot*/), nodeID1); + OFCHECK_EQUAL(tree.gotoNextMatchingNode(filter2), nodeID2); + OFCHECK_EQUAL(tree.gotoNextMatchingNode(filter2), nodeID3); + OFCHECK_EQUAL(tree.gotoNextMatchingNode(filter2), nodeID4); + OFCHECK_EQUAL(tree.gotoMatchingNode(DSRDocumentTreeNodeObservationDateTimeFilter("201708081000", "201708081400")), nodeID2); + OFCHECK_EQUAL(tree.gotoMatchingNode(DSRDocumentTreeNodeObservationDateTimeFilter("20170828", "" /*toDateTime*/)), nodeID3); + OFCHECK_EQUAL(tree.gotoNextMatchingNode(DSRDocumentTreeNodeObservationDateTimeFilter("" /*fromDateTime*/, "201708280800")), nodeID4); + OFCHECK_EQUAL(tree.gotoMatchingNode(DSRDocumentTreeNodeObservationDateTimeFilter("20170828080001", "" /*toDateTime*/)), 0 /* not found */); +} + + OFTEST(dcmsr_gotoNamedNode) { /* first, create a new SR document */ diff --git a/dcmsr/tests/tsrtpl.cc b/dcmsr/tests/tsrtpl.cc index 7e1407d7..863779b5 100644 --- a/dcmsr/tests/tsrtpl.cc +++ b/dcmsr/tests/tsrtpl.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -74,6 +74,7 @@ class SRTestTemplate1410 : DSRSubTemplate("1410", "DCMR") { setExtensible(); + setOrderSignificant(); /* make sure that at least the "root" CONTAINER is there */ OFCHECK(addContentItem(RT_unknown, VT_Container, DSRCodedEntryValue("125007", "DCM", "Measurement Group")).good()); /* ... and two mandatory child nodes */ @@ -135,8 +136,8 @@ class SRTestTemplate1410with1501 : DSRSubTemplate("1410", "DCMR") { setExtensible(); - /* insert sub-template some content items */ - OFCHECK(insertTemplate(SRTestTemplate1410(), AM_belowCurrent, RT_contains).good()); + /* insert sub-template with some content items */ + OFCHECK(insertExtraTemplate(SRTestTemplate1410(), AM_belowCurrent, RT_contains).good()); /* include sub-template with by-reference relationship */ OFCHECK(includeTemplate(DSRSharedSubTemplate(new SRTestTemplate1501()), AM_belowCurrent, RT_contains).good()); } @@ -176,6 +177,7 @@ OFTEST(dcmsr_rootTemplate) OFCHECK_EQUAL(templ.getMappingResourceUID(), UID_DICOMContentMappingResource); OFCHECK(templ.isRootTemplate()); OFCHECK(!templ.isExtensible()); + OFCHECK(!templ.isOrderSignificant()); /* replace the document tree with the content of the template */ OFCHECK(doc.setTreeFromRootTemplate(templ, OFFalse /*expandTree*/).good()); /* and perform some further checks */ @@ -207,6 +209,7 @@ OFTEST(dcmsr_subTemplate_1) OFCHECK_EQUAL(templ.getMappingResourceUID(), ""); OFCHECK(!templ.isRootTemplate()); OFCHECK(templ.isExtensible()); + OFCHECK(templ.isOrderSignificant()); /* insert TID 1410 into the tree ... */ OFCHECK(tree.insertSubTree(templ.cloneTree(), DSRTypes::AM_belowCurrent, DSRTypes::RT_isRoot).good()); /* and replace the tree of the SR document with the content of the template */ @@ -235,7 +238,7 @@ OFTEST(dcmsr_subTemplate_2) OFCHECK_EQUAL(templ1.countNodes(), 1); OFCHECK_EQUAL(templ2.countNodes(), 1); /* insert TID 1003 into TID 2000 */ - OFCHECK(templ1.insertTemplate(templ2, DSRTypes::AM_belowCurrent, DSRTypes::RT_hasAcqContext).good()); + OFCHECK(templ1.insertExtraTemplate(templ2, DSRTypes::AM_belowCurrent, DSRTypes::RT_hasAcqContext).good()); OFCHECK_EQUAL(templ1.countNodes(), 2); OFCHECK_EQUAL(templ2.countNodes(), 1); /* replace the document tree with the content of the template */ @@ -247,6 +250,28 @@ OFTEST(dcmsr_subTemplate_2) } +OFTEST(dcmsr_subTemplate_3) +{ + /* first, create an almost empty "Planar ROI Measurements" (TID 1410) */ + SRTestTemplate1410 templ; + /* then, add additional content items (since the template is extensible) */ + OFCHECK(templ.isExtensible()); + OFCHECK(templ.addExtraContentItem(DSRTypes::RT_contains, DSRTypes::VT_Text).good()); + OFCHECK(templ.getCurrentContentItem().setConceptName(DSRBasicCodedEntry("121106", "DCM", "Comment")).good()); + OFCHECK(templ.getCurrentContentItem().setStringValue("Some comment").good()); + OFCHECK(templ.addExtraContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Text, DSRTypes::AM_belowCurrent).good()); + OFCHECK(templ.getCurrentContentItem().setConceptName(DSRBasicCodedEntry("121051", "DCM", "Equivalent Meaning of Value")).good()); + OFCHECK(templ.getCurrentContentItem().setStringValue("blabla").good()); + OFCHECK(templ.gotoParent() > 0); + /* also try to add if template is non-extensible */ + templ.setExtensible(OFFalse); + OFCHECK(templ.addExtraContentItem(DSRTypes::RT_contains, DSRTypes::VT_Container) == SR_EC_NonExtensibleTemplate); + /* finally, perform some further checks */ + OFCHECK_EQUAL(templ.countNodes(), 5); + OFCHECK_EQUAL(templ.countChildNodes(), 1); +} + + OFTEST(dcmsr_createExpandedTree) { /* first, create an empty SR document */ @@ -274,7 +299,8 @@ OFTEST(dcmsr_templateWithByReferenceRelationship_1) /* first, create an almost empty "Planar ROI Measurements" (TID 1410) */ SRTestTemplate1410 templ; /* insert sub-template with by-reference relationship */ - OFCHECK(templ.insertTemplate(SRTestTemplate1501(), DSRTypes::AM_afterCurrent, DSRTypes::RT_contains).good()); + OFCHECK(templ.isExtensible()); + OFCHECK(templ.insertExtraTemplate(SRTestTemplate1501(), DSRTypes::AM_afterCurrent, DSRTypes::RT_contains).good()); /* then, go to the source content item of the by-reference relationship */ OFCHECK(templ.gotoNamedNode(DSRCodedEntryValue("09876", "99TEST", "Some other Measurement")) > 0); /* check whether the correct content item has been found */ @@ -308,7 +334,8 @@ OFTEST(dcmsr_templateWithByReferenceRelationship_2) SRTestRootTemplate rootTempl; OFCHECK_EQUAL(rootTempl.countNodes(), 1); /* insert the sub-template into it */ - OFCHECK(rootTempl.insertTemplate(subTempl).good()); + OFCHECK(rootTempl.isExtensible()); + OFCHECK(rootTempl.insertExtraTemplate(subTempl).good()); OFCHECK_EQUAL(rootTempl.countNodes(), 5); OFCHECK_EQUAL(rootTempl.countNodes(OFTrue /*searchIntoSubTemplates*/, OFFalse /*countIncludedTemplateNodes*/), 8); /* check whether the by-reference relationship is still valid */ diff --git a/dcmsr/tests/tsrtree.cc b/dcmsr/tests/tsrtree.cc index 6fc6191c..64bfcc20 100644 --- a/dcmsr/tests/tsrtree.cc +++ b/dcmsr/tests/tsrtree.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012-2016, OFFIS e.V. + * Copyright (C) 2012-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -538,6 +538,44 @@ OFTEST(dcmsr_extractSubTree) } +OFTEST(dcmsr_gotoParentUntilRoot) +{ + DSRTree<> tree; + const size_t rootID = tree.getNextNodeID(); + /* first, create a simple tree of 8 nodes and check the references */ + OFCHECK_EQUAL(tree.addNode(new DSRTreeNode()), rootID + 0); + OFCHECK_EQUAL(tree.addNode(new DSRTreeNode(), DSRTypes::AM_belowCurrent), rootID + 1); + OFCHECK_EQUAL(tree.addNode(new DSRTreeNode(), DSRTypes::AM_afterCurrent), rootID + 2); + OFCHECK_EQUAL(tree.addNode(new DSRTreeNode(), DSRTypes::AM_afterCurrent), rootID + 3); + OFCHECK_EQUAL(tree.gotoPrevious(), rootID + 2); + OFCHECK_EQUAL(tree.addNode(new DSRTreeNode(), DSRTypes::AM_belowCurrent), rootID + 4); + OFCHECK_EQUAL(tree.addNode(new DSRTreeNode(), DSRTypes::AM_afterCurrent), rootID + 5); + OFCHECK_EQUAL(tree.gotoPrevious(), rootID + 4); + OFCHECK_EQUAL(tree.addNode(new DSRTreeNode(), DSRTypes::AM_belowCurrent), rootID + 6); + OFCHECK_EQUAL(tree.addNode(new DSRTreeNode(), DSRTypes::AM_belowCurrent), rootID + 7); + /* then, go one level up until the root node is reached */ + size_t prevID; + size_t nodeID = tree.getNodeID(); + do { + prevID = nodeID; + nodeID = tree.gotoParent(); + } while (nodeID != 0); + /* check whether it is really the root node */ + OFCHECK_EQUAL(prevID, rootID); + OFCHECK_EQUAL(tree.getNodeID(), rootID); + /* try again starting at another child node */ + nodeID = rootID + 5; + OFCHECK_EQUAL(tree.gotoNode(nodeID), nodeID); + do { + prevID = nodeID; + nodeID = tree.gotoParent(); + } while (nodeID != 0); + /* check whether it is really the root node */ + OFCHECK_EQUAL(prevID, rootID); + OFCHECK_EQUAL(tree.getNodeID(), rootID); +} + + OFTEST(dcmsr_gotoAnnotatedTreeNode) { DSRTree<> tree; diff --git a/dcmtls/docs/CMakeLists.txt b/dcmtls/docs/CMakeLists.txt index b14aa008..11da0d4d 100644 --- a/dcmtls/docs/CMakeLists.txt +++ b/dcmtls/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES ciphers.txt randseed.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) +INSTALL(FILES ciphers.txt randseed.txt certstor.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git a/dcmtls/docs/Makefile.in b/dcmtls/docs/Makefile.in index a33d1cfb..a7d28ed9 100644 --- a/dcmtls/docs/Makefile.in +++ b/dcmtls/docs/Makefile.in @@ -11,7 +11,7 @@ configdir = @top_srcdir@/@configdir@ include $(configdir)/@common_makefile@ -files = ciphers.txt randseed.txt +files = ciphers.txt randseed.txt certstor.txt all: diff --git a/dcmtls/docs/certstor.txt b/dcmtls/docs/certstor.txt new file mode 100644 index 00000000..c1d3d15d --- /dev/null +++ b/dcmtls/docs/certstor.txt @@ -0,0 +1,67 @@ +============================================================================= +CERTIFICATION AUTHORITY (CA) CERTIFICATE MANAGEMENT IN DCMTK +============================================================================= + +All tools in DCMTK that support TLS encrypted network connections +need to have a list of trusted certificates (typically CA certificates) +that are used in the verification of the peer certificate when +establishing the TLS connection. + +There are two ways of managing this list of trusted certificates: +file-based and directory-based. The command line tools in DCMTK +offer the following command line options for this purpose: + + certification authority: + +cf --add-cert-file [c]ertificate filename: string + add certificate file to list of certificates + +cd --add-cert-dir [c]ertificate directory: string + add certificates in d to list of certificates + +When using DCMTK at library level, the methods corresponding to these +command line options are DcmTransportLayer::addTrustedCertificateFile() +and DcmTransportLayer::addTrustedCertificateDir(). + + +FILE BASED MANAGEMENT OF TRUSTED CERTIFICATES + +The file-based option loads a file and adds all the certificates or CRLs +present in that file into the pool of trusted certificates. File format +is ASCII text containing concatenated PEM certificates and CRLs. + + +DIRECTORY BASED MANAGEMENT OF TRUSTED CERTIFICATES + +The directory-based option specifies a directory containing certificates +and CRLs. These certificates and CRLs are loaded on demand, and cached +in memory once they are loaded. + +The directory should contain one certificate or CRL per file in PEM +format, with a file name of the form hash.N for a certificate, or +hash.rN for a CRL. The hash is computed from the subject name (for +certificates) or the issuer name (for CRLs). The hash value can be +obtained by calling the openssl command line tool: + + openssl x509 -hash -noout -in + +where should be replaced by the filename of the certificate +or CRL. + +The .N or .rN suffix is a sequence number that starts at zero, and is +incremented consecutively for each certificate or CRL with the same hash +value. Gaps in the sequence numbers are not supported, it is assumed +that there are no more objects with the same hash beyond the first +missing number in the sequence. + +Sequence numbers make it possible for the directory to contain multiple +certificates with same subject name hash value. For example, it is +possible to have in the store several certificates with same subject or +several CRLs with same issuer (and, for example, different validity +period). + +Note that the hash algorithm used for subject name hashing changed in +OpenSSL 1.0.0, and all certificate stores have to be rehashed when +moving from OpenSSL 0.9.x to 1.0.0. + +Note: This file contains text adapted from the OpenSSL API +documentation, which is available under the OpenSSL license. +The OpenSSL license is reproduced in DCMTK's COPYRIGHT file. diff --git a/dcmtls/include/CMakeLists.txt b/dcmtls/include/CMakeLists.txt index 2d0d9609..316fa4f6 100644 --- a/dcmtls/include/CMakeLists.txt +++ b/dcmtls/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmtls DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmtls DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmtls/include/dcmtk/dcmtls/tlscond.h b/dcmtls/include/dcmtk/dcmtls/tlscond.h new file mode 100644 index 00000000..f62ea7fe --- /dev/null +++ b/dcmtls/include/dcmtk/dcmtls/tlscond.h @@ -0,0 +1,143 @@ +/* + * + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmtls + * + * Author: Jan Schlamelcher + * + * Purpose: error conditions for DcmTLS + * + */ + +#ifndef TLSCOND_H +#define TLSCOND_H + +#include "dcmtk/config/osconfig.h" + +#include "dcmtk/ofstd/ofcond.h" +#include "dcmtk/dcmdata/dcerror.h" +#include "dcmtk/dcmtls/tlsdefin.h" + +// These classes allow creating error conditions that may either give a general +// description of the error or may also contain some specific information, +// e.g. a file name, while both a specialized object and a generic one would +// use the same error code so it stays comparable. + +/** A struct for creating an unknown ciphersuite error condition. + */ +struct DCMTK_DCMTLS_EXPORT DcmTLSECUnknownCiphersuiteConst : OFConditionConst +{ + /** Constructor, initializes the OFConditionConst base. + * Don't use this if you don't have a very good reason. + */ + DcmTLSECUnknownCiphersuiteConst(); + + /** Create a specialized unknown ciphersuite error condition that + * refers to the name of the unknown ciphersuite that was used. + * @param ciphersuiteName the name of the unknown ciphersuite. + * @return an OFCondition that compares equal to + * DCMTLS_EC_UnknownCiphersuite but also refers to the name of the + * ciphersuite in its descriptive text. + */ + OFCondition operator()( const char* ciphersuiteName ) const; +}; + +/** A struct for creating a failed to load private key error condition. + */ +struct DCMTK_DCMTLS_EXPORT DcmTLSECFailedToLoadPrivateKeyConst : OFConditionConst +{ + /** Constructor, initializes the OFConditionConst base. + * Don't use this if you don't have a very good reason. + */ + DcmTLSECFailedToLoadPrivateKeyConst(); + + /** Create a specialized failed to load private key error condition that + * refers to the file name of the private key that failed to load. + * @param privateKeyFile the file name of the private key file. + * @return an OFCondition that compares equal to + * DCMTLS_EC_FailedToLoadPrivateKey but also refers to the file name of + * the private key in its descriptive text. + */ + OFCondition operator()( const char* privateKeyFile ) const; +}; + +/** A struct for creating a failed to load certificate error condition. + */ +struct DCMTK_DCMTLS_EXPORT DcmTLSECFailedToLoadCertificateConst : OFConditionConst +{ + /** Constructor, initializes the OFConditionConst base. + * Don't use this if you don't have a very good reason. + */ + DcmTLSECFailedToLoadCertificateConst(); + + /** Create a specialized failed to load certificate error condition that + * refers to the file name of the certificate that failed to load. + * @param certificateFile the file name of the certificate file. + * @return an OFCondition that compares equal to + * DCMTLS_EC_FailedToLoadCertificate but also refers to the file name of + * the certificate in its descriptive text. + */ + OFCondition operator()( const char* certificateFile ) const; +}; + +/** A struct for creating a mismatched private key and certificate error condition. + */ +struct DCMTK_DCMTLS_EXPORT DcmTLSECMismatchedPrivateKeyAndCertificateConst : OFConditionConst +{ + /** Constructor, initializes the OFConditionConst base. + * Don't use this if you don't have a very good reason. + */ + DcmTLSECMismatchedPrivateKeyAndCertificateConst(); + + /** Create a specialized mismatched private key and certificate error condition + * that refers to the file names of the private key and certificate file that + * did not match. + * @param privateKeyFile the file name of the private key file. + * @param certificateFile the file name of the certificate file. + * @return an OFCondition that compares equal to + * DCMTLS_EC_MismatchedPrivateKeyAndCertificate but also refers to the file + * names of the private key and certificate in its descriptive text. + */ + OFCondition operator()( const char* privateKeyFile, const char* certificateFile ) const; +}; + +/** A struct for creating a failed to write random seed file error condition. + */ +struct DCMTK_DCMTLS_EXPORT DcmTLSECFailedToWriteRandomSeedFileConst : OFConditionConst +{ + /** Constructor, initializes the OFConditionConst base. + * Don't use this if you don't have a very good reason. + */ + DcmTLSECFailedToWriteRandomSeedFileConst(); + + /** Create a specialized failed to write random seed file error condition + * that refers to the file name of the seed file that could not be written. + * @param seedFile the file name of the random seed file. + * @return an OFCondition that compares equal to + * DCMTLS_EC_FailedToWriteRandomSeedFile but also refers to the file name + * of the random seed file in its descriptive text. + */ + OFCondition operator()( const char* seedFile ) const; +}; + +// Declaration of generic error code instances + +extern DCMTK_DCMTLS_EXPORT const DcmTLSECUnknownCiphersuiteConst DCMTLS_EC_UnknownCiphersuite; +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_FailedToCreateTLSTransportLayer; +extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToLoadPrivateKeyConst DCMTLS_EC_FailedToLoadPrivateKey; +extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToLoadCertificateConst DCMTLS_EC_FailedToLoadCertificate; +extern DCMTK_DCMTLS_EXPORT const DcmTLSECMismatchedPrivateKeyAndCertificateConst DCMTLS_EC_MismatchedPrivateKeyAndCertificate; +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_FailedToSetCiphersuites; +extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToWriteRandomSeedFileConst DCMTLS_EC_FailedToWriteRandomSeedFile; + +#endif // TLSCOND_H diff --git a/dcmtls/include/dcmtk/dcmtls/tlslayer.h b/dcmtls/include/dcmtk/dcmtls/tlslayer.h index 6126b429..da53700f 100644 --- a/dcmtls/include/dcmtk/dcmtls/tlslayer.h +++ b/dcmtls/include/dcmtk/dcmtls/tlslayer.h @@ -79,6 +79,13 @@ public: */ typedef SSL_CTX* native_handle_type; + /** constructor. + * Constructs a DcmTLSTransportLayer object without initializing it, e.g. + * as a placeholder that may or may not be used later depending on user + * input. + */ + DcmTLSTransportLayer(); + /** constructor. * @param networkRole network role to be used by the application, influences * the choice of the secure transport layer code. @@ -90,9 +97,51 @@ public: */ DcmTLSTransportLayer(int networkRole, const char *randFile, OFBool initializeOpenSSL = OFTrue); + /** move constructor. + * Transfer ownership from another DcmTLSTransportLayer object to the newly + * constructed object (*this). + * @param rhs an rvalue reference to another DcmTLSTransportLayer object. + */ + DcmTLSTransportLayer(OFrvalue_ref(DcmTLSTransportLayer) rhs); + + /** move assignment. + * Assign ownership from another DcmTLSTransportLayer object to *this, + * freeing the existing object first (if any). + * @param rhs an rvalue reference to another DcmTLSTransportLayer object. + * @return *this. + */ + DcmTLSTransportLayer& operator=(OFrvalue_ref(DcmTLSTransportLayer) rhs); + /// destructor virtual ~DcmTLSTransportLayer(); + /** Free resources, e.g. the OpenSSL context used by this object and reset + * all members to the default values. Will do nothing if this object has + * not been initialized, e.g. by using the default constructor. + */ + void clear(); + +#ifdef HAVE_CXX11 + explicit +#endif // HAVE_CXX11 + /** Query whether this object has been initialized successfully, i.e. + * whether it owns a successfully created OpenSSL context. + * @return OFTrue if *this owns refers to a valid OpenSSL context, + * OFFalse otherwise. + * @note If C++11 support is available, the conversion operator is marked as + * explicit, which prevents *this to be interpreted as a + * boolean value in an inappropriate context. You should use this operator + * with caution when C++11 support is unavailable, as *this might + * be converted to a boolean value automatically where it shouldn't. + */ + operator OFBool() const; + + /** Query whether this object has not been initialized, e.g. has been + * constructed using the default constructor or the initialization failed. + * @return OFTrue if *this ist not initialized, OFFalse otherwise. + */ + OFBool operator!() const; + /** factory method that returns a new transport connection for the * given socket. Depending on the second parameter, either a transparent * or a secure connection is established. If the object cannot be created @@ -294,6 +343,16 @@ private: }; +#else /* WITH_OPENSSL */ + +// trivial declaration of DcmTLSTransportLayer as a placeholder +class DCMTK_DCMTLS_EXPORT DcmTLSTransportLayer : public DcmTransportLayer +{ +public: + inline DcmTLSTransportLayer(OFrvalue_ref(DcmTLSTransportLayer) /* rhs */) {} + inline DcmTLSTransportLayer& operator=(OFrvalue_ref(DcmTLSTransportLayer) /* rhs */) { return *this; } +}; + #endif /* WITH_OPENSSL */ #endif diff --git a/dcmtls/include/dcmtk/dcmtls/tlsopt.h b/dcmtls/include/dcmtk/dcmtls/tlsopt.h new file mode 100644 index 00000000..cabe4149 --- /dev/null +++ b/dcmtls/include/dcmtk/dcmtls/tlsopt.h @@ -0,0 +1,108 @@ +/* + * + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmtls + * + * Author: Jan Schlamelcher + * + * Purpose: + * classes: DcmTLSOptions + * + */ + +#ifndef TLSOPT_H +#define TLSOPT_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/ofstd/ofvriant.h" +#include "dcmtk/dcmtls/tlslayer.h" + +/** A class that handles the command line arguments used by applications + * that support TLS. + * DcmTLSOptions handles storing the relevant options, printing the associated + * help text an information (e.g. OpenSSL library version), parsing and + * evaluating the given command line arguments and creating a + * DcmTLSTransportLayer object based on the collected information. + */ +class DCMTK_DCMTLS_EXPORT DcmTLSOptions +{ +public: + + /** Print OpenSSL library version string. + * Does nothing if OpenSSL is not available. + */ + static void printLibraryVersion(); + + /** Constructor. + * @param app a reference to an OFConsoleApplication object used in the + * calling application. + * @param cmd a reference to an OFCommandLine object used to parse + * the command line argument give to the calling application. + */ + DcmTLSOptions( class OFConsoleApplication& app, class OFCommandLine& cmd ); + + /** Parse and evaluate the given command line arguments. + * @return EC_Normal on success, an error condition indicating what went + * wrong if any invalid argument was encountered, e.g. a selected + * ciphersuite is not supported. + */ + OFCondition parseArguments(); + + /** Create a DcmTLSTransportLayer object based on the collected command + * line arguments. + * @param networkRole the network role to create a transport layer for, + * DICOM_APPLICATION_ACCEPTOR or DICOM_APPLICATION_REQUESTOR. + * @return Either a newly created DcmTLSTransportLayer object or an + * OFCondition indicating why no DcmTLSTransportLayer object was created. + * There are two possible reasons why this might happen: either the + * given command line arguments did not request to use a secure transport + * layer - in this case EC_Normal will be returned indicating one should + * simply ignore the result - or an error occurred when trying to create + * the DcmTLSTransport layer. In the latter case the returned OFCondition + * will contain an error condition describing what went wrong. + */ + OFrvalue > + createTransportLayer( int networkRole ); + + /** Update the random seed file if this was requested by the given command + * line arguments. + * @param layer a reference to a DcmTLSTransportLayer object that contains + * the information for updating the random seed file, e.g. created via + * createTransportLayer(). + * @return EC_Normal if the random seed file was successfully updated or + * if the user did not request the random seed file to be update. An + * error condition indicating what went wrong in case the random seed + * file could not be updated. + */ + OFCondition writeRandomSeedFileIfEnabled( DcmTLSTransportLayer& layer ); + +private: +#ifdef WITH_OPENSSL + class OFConsoleApplication& m_ConsoleApp; + class OFCommandLine& m_CommandLine; + int opt_keyFileFormat; + OFBool opt_doAuthenticate; + const char* opt_privateKeyFile; + const char* opt_certificateFile; + const char* opt_passwd; + OFString opt_ciphersuites; + const char* opt_readSeedFile; + const char* opt_writeSeedFile; + DcmCertificateVerification opt_certVerification; + const char* opt_dhparam; + OFBool opt_secureConnection; +#endif // WITH_OPENSSL +}; + +#endif // TLSOPT_H diff --git a/dcmtls/libsrc/CMakeLists.txt b/dcmtls/libsrc/CMakeLists.txt index ae550cb9..e12cbb6c 100644 --- a/dcmtls/libsrc/CMakeLists.txt +++ b/dcmtls/libsrc/CMakeLists.txt @@ -1,5 +1,5 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmtls tlslayer tlstrans tlsscu) +DCMTK_ADD_LIBRARY(dcmtls tlscond tlslayer tlsopt tlstrans tlsscu) DCMTK_TARGET_LINK_MODULES(dcmtls ofstd dcmdata dcmnet) DCMTK_TARGET_LINK_LIBRARIES(dcmtls ${OPENSSL_LIBS}) diff --git a/dcmtls/libsrc/Makefile.dep b/dcmtls/libsrc/Makefile.dep index efeb2c17..f9d77803 100644 --- a/dcmtls/libsrc/Makefile.dep +++ b/dcmtls/libsrc/Makefile.dep @@ -1,3 +1,16 @@ +tlscond.o: tlscond.cc ../../config/include/dcmtk/config/osconfig.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../include/dcmtk/dcmtls/tlscond.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../include/dcmtk/dcmtls/tlsdefin.h tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmtls/tlsdefin.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -9,6 +22,9 @@ tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -23,9 +39,6 @@ tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -58,6 +71,67 @@ tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h +tlsopt.o: tlsopt.cc ../../config/include/dcmtk/config/osconfig.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../include/dcmtk/dcmtls/tlscond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlsopt.h \ + ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ + ../../ofstd/include/dcmtk/ofstd/ofalign.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../include/dcmtk/dcmtls/tlslayer.h \ + ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ + ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ + ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h tlsscu.o: tlsscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmtls/tlsscu.h ../../dcmnet/include/dcmtk/dcmnet/scu.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -212,6 +286,9 @@ tlstrans.o: tlstrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlslayer.h \ @@ -227,9 +304,6 @@ tlstrans.o: tlstrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ diff --git a/dcmtls/libsrc/Makefile.in b/dcmtls/libsrc/Makefile.in index d8fa0915..a2dd073f 100644 --- a/dcmtls/libsrc/Makefile.in +++ b/dcmtls/libsrc/Makefile.in @@ -20,7 +20,7 @@ dcmnetdir = $(top_srcdir)/../dcmnet LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/include -I$(dcmnetdir)/include LOCALDEFS = -objs = tlstrans.o tlslayer.o tlsscu.o +objs = tlscond.o tlstrans.o tlslayer.o tlsopt.o tlsscu.o library = libdcmtls.$(LIBEXT) diff --git a/dcmtls/libsrc/tlscond.cc b/dcmtls/libsrc/tlscond.cc new file mode 100644 index 00000000..8ddf3aca --- /dev/null +++ b/dcmtls/libsrc/tlscond.cc @@ -0,0 +1,146 @@ +/* + * + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmtls + * + * Author: Jan Schlamelcher + * + * Purpose: error conditions for DcmTLS + * + */ + +#include "dcmtk/config/osconfig.h" + +#include "dcmtk/ofstd/ofstream.h" +#include "dcmtk/dcmtls/tlscond.h" + +// instantiation of pure generic error codes + +makeOFConditionConst( DCMTLS_EC_FailedToCreateTLSTransportLayer, OFM_dcmtls, 1, OF_error, "Unable to create TLS transport layer" ); +makeOFConditionConst( DCMTLS_EC_FailedToSetCiphersuites, OFM_dcmtls, 2, OF_error, "Unable to set selected cipher suites" ); + +// implementation of specializable error codes + +DcmTLSECUnknownCiphersuiteConst::DcmTLSECUnknownCiphersuiteConst() +{ + theModule = OFM_dcmtls; + theCode = 3; + theStatus = OF_error; + theText = "Unknown ciphersuite"; +} + +OFCondition DcmTLSECUnknownCiphersuiteConst::operator()( const char* ciphersuiteName ) const +{ + if( !ciphersuiteName ) + return *this; + OFOStringStream os; + os << theText << ": " << ciphersuiteName; + OFCondition cond; + OFSTRINGSTREAM_GETSTR( os, c ) + cond = makeOFCondition( theModule, theCode, theStatus, c ); + OFSTRINGSTREAM_FREESTR( c ) + return cond; +} + +DcmTLSECFailedToLoadPrivateKeyConst::DcmTLSECFailedToLoadPrivateKeyConst() +{ + theModule = OFM_dcmtls; + theCode = 4; + theStatus = OF_error; + theText = "Unable to load private TLS key"; +} + +OFCondition DcmTLSECFailedToLoadPrivateKeyConst::operator()( const char* privateKeyFile ) const +{ + if( !privateKeyFile ) + return *this; + OFOStringStream os; + os << theText << " from '" << privateKeyFile << '\''; + OFCondition cond; + OFSTRINGSTREAM_GETSTR( os, c ) + cond = makeOFCondition( theModule, theCode, theStatus, c ); + OFSTRINGSTREAM_FREESTR( c ) + return cond; +} + +DcmTLSECFailedToLoadCertificateConst::DcmTLSECFailedToLoadCertificateConst() +{ + theModule = OFM_dcmtls; + theCode = 5; + theStatus = OF_error; + theText = "Unable to load certificate"; +} + +OFCondition DcmTLSECFailedToLoadCertificateConst::operator()( const char* certificateFile ) const +{ + if( !certificateFile ) + return *this; + OFOStringStream os; + os << theText << " from '" << certificateFile << '\''; + OFCondition cond; + OFSTRINGSTREAM_GETSTR( os, c ) + cond = makeOFCondition( theModule, theCode, theStatus, c ); + OFSTRINGSTREAM_FREESTR( c ) + return cond; +} + +DcmTLSECMismatchedPrivateKeyAndCertificateConst::DcmTLSECMismatchedPrivateKeyAndCertificateConst() +{ + theModule = OFM_dcmtls; + theCode = 6; + theStatus = OF_error; + theText = "Private key and certificate do not match"; +} + +OFCondition DcmTLSECMismatchedPrivateKeyAndCertificateConst::operator()( const char* privateKeyFile, + const char* certificateFile ) const +{ + if( !privateKeyFile || !certificateFile ) + return *this; + OFOStringStream os; + os << "Private key '" << privateKeyFile << "' and certificate '" << certificateFile << "' do not match"; + OFCondition cond; + OFSTRINGSTREAM_GETSTR( os, c ) + cond = makeOFCondition( theModule, theCode, theStatus, c ); + OFSTRINGSTREAM_FREESTR( c ) + return cond; +} + +DcmTLSECFailedToWriteRandomSeedFileConst::DcmTLSECFailedToWriteRandomSeedFileConst() +{ + theModule = OFM_dcmtls; + theCode = 7; + theStatus = OF_error; + theText = "Cannot write random seed"; +} + +OFCondition DcmTLSECFailedToWriteRandomSeedFileConst::operator()( const char* seedFile ) const +{ + if( !seedFile ) + return *this; + OFOStringStream os; + os << theText << " '" << seedFile << '\''; + OFCondition cond; + OFSTRINGSTREAM_GETSTR( os, c ) + cond = makeOFCondition( theModule, theCode, theStatus, c ); + OFSTRINGSTREAM_FREESTR( c ) + return cond; +} + +// instantiation of specializable error codes + +const DcmTLSECUnknownCiphersuiteConst DCMTLS_EC_UnknownCiphersuite; +const DcmTLSECFailedToLoadPrivateKeyConst DCMTLS_EC_FailedToLoadPrivateKey; +const DcmTLSECFailedToLoadCertificateConst DCMTLS_EC_FailedToLoadCertificate; +const DcmTLSECMismatchedPrivateKeyAndCertificateConst DCMTLS_EC_MismatchedPrivateKeyAndCertificate; +const DcmTLSECFailedToWriteRandomSeedFileConst DCMTLS_EC_FailedToWriteRandomSeedFile; diff --git a/dcmtls/libsrc/tlslayer.cc b/dcmtls/libsrc/tlslayer.cc index 24fc5b21..d601d859 100644 --- a/dcmtls/libsrc/tlslayer.cc +++ b/dcmtls/libsrc/tlslayer.cc @@ -161,6 +161,15 @@ const char *DcmTLSTransportLayer::findOpenSSLCipherSuiteName(const char *tlsCiph return NULL; } +DcmTLSTransportLayer::DcmTLSTransportLayer() +: DcmTransportLayer() +, transportLayerContext(NULL) +, canWriteRandseed(OFFalse) +, privateKeyPasswd() +{ + +} + DcmTLSTransportLayer::DcmTLSTransportLayer(int networkRole, const char *randFile, OFBool initializeOpenSSL) : DcmTransportLayer(networkRole) , transportLayerContext(NULL) @@ -178,14 +187,21 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(int networkRole, const char *randFile } #if OPENSSL_VERSION_NUMBER < 0x10100000L + // on versions of OpenSSL older than 1.1.0, we use the + // SSLv23 methods and not the TLSv1 methods because the latter + // only accept TLS 1.0 and prevent the negotiation of newer + // versions of TLS. + // We use SSL_CTX_set_options() to disable SSLv2 and SSLv3. if (networkRole == DICOM_APPLICATION_ACCEPTOR) { - transportLayerContext = SSL_CTX_new(TLSv1_server_method()); + transportLayerContext = SSL_CTX_new(SSLv23_server_method()); } else if (networkRole == DICOM_APPLICATION_REQUESTOR) { - transportLayerContext = SSL_CTX_new(TLSv1_client_method()); + transportLayerContext = SSL_CTX_new(SSLv23_client_method()); } else { - transportLayerContext = SSL_CTX_new(TLSv1_method()); + transportLayerContext = SSL_CTX_new(SSLv23_method()); } + SSL_CTX_set_options(transportLayerContext, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3); + #else // starting with OpenSSL 1.1.0, a new TLS_method() is offered // that automatically selects the highest version of the TLS @@ -214,6 +230,50 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(int networkRole, const char *randFile setCertificateVerification(DCV_requireCertificate); /* default */ } +DcmTLSTransportLayer::DcmTLSTransportLayer(OFrvalue_ref(DcmTLSTransportLayer) rhs) +: DcmTransportLayer(OFrvalue_ref_upcast(DcmTransportLayer, rhs)) +, transportLayerContext(rhs.transportLayerContext) +, canWriteRandseed(OFmove(OFrvalue_access(rhs).canWriteRandseed)) +, privateKeyPasswd(OFmove(OFrvalue_access(rhs).privateKeyPasswd)) +{ + OFrvalue_access(rhs).transportLayerContext = NULL; +} + +DcmTLSTransportLayer& DcmTLSTransportLayer::operator=(OFrvalue_ref(DcmTLSTransportLayer) rhs) +{ + if (this != &rhs) + { + clear(); + DcmTransportLayer::operator=(OFrvalue_ref_upcast(DcmTransportLayer, rhs)); + transportLayerContext = rhs.transportLayerContext; + canWriteRandseed = OFmove(OFrvalue_access(rhs).canWriteRandseed); + privateKeyPasswd = OFmove(OFrvalue_access(rhs).privateKeyPasswd); + OFrvalue_access(rhs).transportLayerContext = NULL; + } + return *this; +} + +void DcmTLSTransportLayer::clear() +{ + if (transportLayerContext) + { + SSL_CTX_free(transportLayerContext); + transportLayerContext = NULL; + canWriteRandseed = OFFalse; + privateKeyPasswd.clear(); + } +} + +DcmTLSTransportLayer::operator OFBool() const +{ + return !!transportLayerContext; +} + +OFBool DcmTLSTransportLayer::operator!() const +{ + return !transportLayerContext; +} + OFBool DcmTLSTransportLayer::setTempDHParameters(const char *filename) { if ((filename==NULL)||(transportLayerContext==NULL)) return OFFalse; @@ -297,7 +357,7 @@ DcmTransportLayerStatus DcmTLSTransportLayer::setCipherSuites(const char *suites DcmTLSTransportLayer::~DcmTLSTransportLayer() { - if (transportLayerContext) SSL_CTX_free(transportLayerContext); + clear(); } DcmTransportLayerStatus DcmTLSTransportLayer::setPrivateKeyFile(const char *fileName, int fileType) @@ -424,7 +484,7 @@ DcmTransportConnection *DcmTLSTransportLayer::createConnection(DcmNativeSocketTy } return NULL; } - else return new DcmTCPConnection(openSocket); + else return DcmTransportLayer::createConnection(openSocket, useSecureLayer); } void DcmTLSTransportLayer::seedPRNG(const char *randFile) diff --git a/dcmtls/libsrc/tlsopt.cc b/dcmtls/libsrc/tlsopt.cc new file mode 100644 index 00000000..23a8e5ea --- /dev/null +++ b/dcmtls/libsrc/tlsopt.cc @@ -0,0 +1,270 @@ +/* + * + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmtls + * + * Author: Jan Schlamelcher + * + * Purpose: + * classes: DcmTLSOptions + * + */ + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/ofstd/ofcmdln.h" +#include "dcmtk/dcmtls/tlscond.h" +#include "dcmtk/dcmtls/tlsopt.h" + +void DcmTLSOptions::printLibraryVersion() +{ +#ifdef WITH_OPENSSL + COUT << "- " << OPENSSL_VERSION_TEXT << OFendl; +#endif +} + +DcmTLSOptions::DcmTLSOptions( OFConsoleApplication& app, OFCommandLine& cmd ) +#ifdef WITH_OPENSSL +: m_ConsoleApp( app ) +, m_CommandLine( cmd ) +, opt_keyFileFormat( SSL_FILETYPE_PEM ) +, opt_doAuthenticate( OFFalse ) +, opt_privateKeyFile( OFnullptr ) +, opt_certificateFile( OFnullptr ) +, opt_passwd( OFnullptr ) +#if OPENSSL_VERSION_NUMBER >= 0x0090700fL +, opt_ciphersuites( TLS1_TXT_RSA_WITH_AES_128_SHA ":" SSL3_TXT_RSA_DES_192_CBC3_SHA ) +#else +, opt_ciphersuites( SSL3_TXT_RSA_DES_192_CBC3_SHA ) +#endif +, opt_readSeedFile( OFnullptr ) +, opt_writeSeedFile( OFnullptr ) +, opt_certVerification( DCV_requireCertificate ) +, opt_dhparam( OFnullptr ) +, opt_secureConnection( OFFalse ) // default: no secure connection +{ + m_CommandLine.addGroup( "transport layer security (TLS) options:" ); + m_CommandLine.addSubGroup( "transport protocol stack:"); + m_CommandLine.addOption( "--disable-tls", "-tls", "use normal TCP/IP connection (default)" ); + m_CommandLine.addOption( "--enable-tls", "+tls", 2, "[p]rivate key file, [c]ertificate file: string", + "use authenticated secure TLS connection" ); + m_CommandLine.addOption( "--anonymous-tls", "+tla", "use secure TLS connection without certificate" ); + m_CommandLine.addSubGroup( "private key password (only with --enable-tls):" ); + m_CommandLine.addOption( "--std-passwd", "+ps", "prompt user to type password on stdin (default)" ); + m_CommandLine.addOption( "--use-passwd", "+pw", 1, "[p]assword: string ", + "use specified password" ); + m_CommandLine.addOption( "--null-passwd", "-pw", "use empty string as password" ); + m_CommandLine.addSubGroup( "key and certificate file format:" ); + m_CommandLine.addOption( "--pem-keys", "-pem", "read keys and certificates as PEM file (default)" ); + m_CommandLine.addOption( "--der-keys", "-der", "read keys and certificates as DER file" ); + m_CommandLine.addSubGroup( "certification authority:" ); + m_CommandLine.addOption( "--add-cert-file", "+cf", 1, "[c]ertificate filename: string", + "add certificate file to list of certificates", OFCommandLine::AF_NoWarning ); + m_CommandLine.addOption( "--add-cert-dir", "+cd", 1, "[c]ertificate directory: string", + "add certificates in d to list of certificates", OFCommandLine::AF_NoWarning ); + m_CommandLine.addSubGroup( "ciphersuite:"); + m_CommandLine.addOption( "--cipher", "+cs", 1, "[c]iphersuite name: string", + "add ciphersuite to list of negotiated suites" ); + m_CommandLine.addOption( "--dhparam", "+dp", 1, "[f]ilename: string", + "read DH parameters for DH/DSS ciphersuites" ); + m_CommandLine.addSubGroup( "pseudo random generator:" ); + m_CommandLine.addOption( "--seed", "+rs", 1, "[f]ilename: string", + "seed random generator with contents of f" ); + m_CommandLine.addOption( "--write-seed", "+ws", "write back modified seed (only with --seed)" ); + m_CommandLine.addOption( "--write-seed-file", "+wf", 1, "[f]ilename: string (only with --seed)", + "write modified seed to file f" ); + m_CommandLine.addSubGroup( "peer authentication:" ); + m_CommandLine.addOption( "--require-peer-cert", "-rc", "verify peer certificate, fail if absent (default)" ); + m_CommandLine.addOption( "--verify-peer-cert", "-vc", "verify peer certificate if present" ); + m_CommandLine.addOption( "--ignore-peer-cert", "-ic", "don't verify peer certificate" ); +} +#else // WITH_OPENSSL +{ + // no OpenSSL available, don't add any command line arguments +} +#endif // WITH_OPENSSL + +OFCondition DcmTLSOptions::parseArguments() +{ +#ifdef WITH_OPENSSL + m_CommandLine.beginOptionBlock(); + if( m_CommandLine.findOption( "--disable-tls" ) ) + opt_secureConnection = OFFalse; + if( m_CommandLine.findOption( "--enable-tls" ) ) + { + opt_secureConnection = OFTrue; + opt_doAuthenticate = OFTrue; + m_ConsoleApp.checkValue( m_CommandLine.getValue( opt_privateKeyFile ) ); + m_ConsoleApp.checkValue( m_CommandLine.getValue( opt_certificateFile ) ); + } + if( m_CommandLine.findOption( "--anonymous-tls" ) ) + opt_secureConnection = OFTrue; + m_CommandLine.endOptionBlock(); + + m_CommandLine.beginOptionBlock(); + if( m_CommandLine.findOption( "--std-passwd" ) ) + { + m_ConsoleApp.checkDependence("--std-passwd", "--enable-tls", opt_doAuthenticate); + opt_passwd = OFnullptr; + } + if( m_CommandLine.findOption("--use-passwd") ) + { + m_ConsoleApp.checkDependence( "--use-passwd", "--enable-tls", opt_doAuthenticate ); + m_ConsoleApp.checkValue( m_CommandLine.getValue( opt_passwd ) ); + } + if( m_CommandLine.findOption( "--null-passwd" ) ) + { + m_ConsoleApp.checkDependence( "--null-passwd", "--enable-tls", opt_doAuthenticate ); + opt_passwd = ""; + } + m_CommandLine.endOptionBlock(); + + m_CommandLine.beginOptionBlock(); + if( m_CommandLine.findOption( "--pem-keys" ) ) + opt_keyFileFormat = SSL_FILETYPE_PEM; + if( m_CommandLine.findOption( "--der-keys" ) ) + opt_keyFileFormat = SSL_FILETYPE_ASN1; + m_CommandLine.endOptionBlock(); + + if( m_CommandLine.findOption( "--dhparam" ) ) + m_ConsoleApp.checkValue( m_CommandLine.getValue( opt_dhparam ) ); + if( m_CommandLine.findOption( "--seed" ) ) + m_ConsoleApp.checkValue( m_CommandLine.getValue( opt_readSeedFile ) ); + + m_CommandLine.beginOptionBlock(); + if( m_CommandLine.findOption( "--write-seed" ) ) + { + m_ConsoleApp.checkDependence( "--write-seed", "--seed", opt_readSeedFile != OFnullptr ); + opt_writeSeedFile = opt_readSeedFile; + } + if( m_CommandLine.findOption( "--write-seed-file" ) ) + { + m_ConsoleApp.checkDependence( "--write-seed-file", "--seed", opt_readSeedFile != OFnullptr ); + m_ConsoleApp.checkValue( m_CommandLine.getValue( opt_writeSeedFile ) ); + } + m_CommandLine.endOptionBlock(); + + m_CommandLine.beginOptionBlock(); + if( m_CommandLine.findOption( "--require-peer-cert" ) ) + opt_certVerification = DCV_requireCertificate; + if( m_CommandLine.findOption( "--verify-peer-cert" ) ) + opt_certVerification = DCV_checkCertificate; + if( m_CommandLine.findOption( "--ignore-peer-cert" ) ) + opt_certVerification = DCV_ignoreCertificate; + m_CommandLine.endOptionBlock(); + + const char* current = OFnullptr; + const char* currentOpenSSL; + if( m_CommandLine.findOption( "--cipher", 0, OFCommandLine::FOM_First ) ) + { + opt_ciphersuites.clear(); + do + { + m_ConsoleApp.checkValue( m_CommandLine.getValue( current ) ); + if( !( currentOpenSSL = DcmTLSTransportLayer::findOpenSSLCipherSuiteName( current ) ) ) + { + return DCMTLS_EC_UnknownCiphersuite( current ); + } + else + { + if( !opt_ciphersuites.empty() ) + opt_ciphersuites += ":"; + opt_ciphersuites += currentOpenSSL; + } + } + while( m_CommandLine.findOption( "--cipher", 0, OFCommandLine::FOM_Next ) ); + } +#endif + return EC_Normal; +} + +OFrvalue > +DcmTLSOptions::createTransportLayer( int networkRole ) +{ + // Pre C++11 compilers won't understand that the result is implicitly + // convertable, therefore, we need to explicitly construct the return type. + // This typedef eases it a bit. + typedef OFrvalue > return_type; + +#ifdef WITH_OPENSSL + if( opt_secureConnection ) + { + DcmTLSTransportLayer tlsLayer( networkRole, opt_readSeedFile ); + if( !tlsLayer ) + return return_type( DCMTLS_EC_FailedToCreateTLSTransportLayer ); + + if( m_CommandLine.findOption( "--add-cert-file", 0, OFCommandLine::FOM_First ) ) + { + const char *current = OFnullptr; + do + { + m_ConsoleApp.checkValue( m_CommandLine.getValue( current ) ); + if( TCS_ok != tlsLayer.addTrustedCertificateFile( current, opt_keyFileFormat ) ) + DCMTLS_WARN( "unable to load certificate file '" << current << "', ignoring" ); + } + while( m_CommandLine.findOption( "--add-cert-file", 0, OFCommandLine::FOM_Next ) ); + } + + if( m_CommandLine.findOption( "--add-cert-dir", 0, OFCommandLine::FOM_First ) ) + { + const char *current = OFnullptr; + do + { + m_ConsoleApp.checkValue( m_CommandLine.getValue( current ) ); + if( TCS_ok != tlsLayer.addTrustedCertificateDir( current, opt_keyFileFormat ) ) + DCMTLS_WARN( "unable to load certificates from directory '" << current << "', ignoring" ); + } + while( m_CommandLine.findOption( "--add-cert-dir", 0, OFCommandLine::FOM_Next ) ); + } + + if( opt_dhparam && !tlsLayer.setTempDHParameters( opt_dhparam ) ) + DCMTLS_WARN( "unable to load temporary DH parameter file '" << opt_dhparam << "', ignoring" ); + + if( opt_doAuthenticate ) + { + if( opt_passwd ) + tlsLayer.setPrivateKeyPasswd( opt_passwd ); + if( TCS_ok != tlsLayer.setPrivateKeyFile( opt_privateKeyFile, opt_keyFileFormat ) ) + return return_type( DCMTLS_EC_FailedToLoadPrivateKey( opt_privateKeyFile ) ); + if( TCS_ok != tlsLayer.setCertificateFile( opt_certificateFile, opt_keyFileFormat ) ) + return return_type( DCMTLS_EC_FailedToLoadCertificate( opt_certificateFile ) ); + if( !tlsLayer.checkPrivateKeyMatchesCertificate() ) + return return_type( DCMTLS_EC_MismatchedPrivateKeyAndCertificate( opt_privateKeyFile, opt_certificateFile ) ); + } + + if( TCS_ok != tlsLayer.setCipherSuites( opt_ciphersuites.c_str() ) ) + return return_type( DCMTLS_EC_FailedToSetCiphersuites ); + + tlsLayer.setCertificateVerification( opt_certVerification ); + + return return_type( OFmove( tlsLayer ) ); + } +#endif + return return_type( EC_Normal ); +} + +OFCondition DcmTLSOptions::writeRandomSeedFileIfEnabled( DcmTLSTransportLayer& layer ) +{ +#ifdef WITH_OPENSSL + if( opt_writeSeedFile ) + { + if( layer.canWriteRandomSeed() ) + { + if( !layer.writeRandomSeed( opt_writeSeedFile ) ) + return DCMTLS_EC_FailedToWriteRandomSeedFile( opt_writeSeedFile ); + } + else return DCMTLS_EC_FailedToWriteRandomSeedFile; + } +#endif + return EC_Normal; +} diff --git a/dcmtls/libsrc/tlstrans.cc b/dcmtls/libsrc/tlstrans.cc index f50c4497..ab621d78 100644 --- a/dcmtls/libsrc/tlstrans.cc +++ b/dcmtls/libsrc/tlstrans.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2017, OFFIS e.V. + * Copyright (C) 1998-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -50,6 +50,10 @@ BEGIN_EXTERN_C #include END_EXTERN_C +#ifdef DCMTK_HAVE_POLL +#include +#endif + #include "dcmtk/ofstd/ofbmanip.h" #include "dcmtk/dcmtls/tlstrans.h" #include "dcmtk/dcmtls/tlslayer.h" @@ -258,20 +262,31 @@ OFBool DcmTLSConnection::networkDataAvailable(int timeout) if (SSL_pending(tlsConnection)) return OFTrue; struct timeval t; - fd_set fdset; int nfound; +#ifndef DCMTK_HAVE_POLL + fd_set fdset; FD_ZERO(&fdset); FD_SET(getSocket(), &fdset); +#endif t.tv_sec = timeout; t.tv_usec = 0; +#ifdef DCMTK_HAVE_POLL + struct pollfd pfd[] = + { + { getSocket(), POLLIN, 0 } + }; + nfound = poll(pfd, 1, t.tv_sec*1000+(t.tv_usec/1000)); +#else #ifdef HAVE_INTP_SELECT nfound = select(OFstatic_cast(int, getSocket() + 1), (int *)(&fdset), NULL, NULL, &t); #else // This is safe because on Windows the first select() parameter is ignored anyway nfound = select(OFstatic_cast(int, getSocket() + 1), &fdset, NULL, NULL, &t); -#endif +#endif /* HAVE_INTP_SELECT */ +#endif /* DCMTK_HAVE_POLL */ + if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { DU_logSelectResult(nfound); @@ -279,8 +294,13 @@ OFBool DcmTLSConnection::networkDataAvailable(int timeout) if (nfound <= 0) return OFFalse; else { +#ifdef DCMTK_HAVE_POLL + if (pfd[0].revents & POLLIN) return OFTrue; + else return OFFalse; /* This should not really happen */ +#else if (FD_ISSET(getSocket(), &fdset)) return OFTrue; else return OFFalse; /* This should not really happen */ +#endif } } diff --git a/dcmtract/include/CMakeLists.txt b/dcmtract/include/CMakeLists.txt index f05bd835..d1c7d65e 100644 --- a/dcmtract/include/CMakeLists.txt +++ b/dcmtract/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmtract DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE) +INSTALL(DIRECTORY dcmtk/dcmtract DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE) diff --git a/dcmtract/include/dcmtk/dcmtract/trcstatistic.h b/dcmtract/include/dcmtk/dcmtract/trcstatistic.h old mode 100755 new mode 100644 diff --git a/dcmtract/include/dcmtk/dcmtract/trctractographyresults.h b/dcmtract/include/dcmtk/dcmtract/trctractographyresults.h index f37947fb..1089a7db 100644 --- a/dcmtract/include/dcmtk/dcmtract/trctractographyresults.h +++ b/dcmtract/include/dcmtk/dcmtract/trctractographyresults.h @@ -66,13 +66,15 @@ public: const IODReferences& imageReferences, TrcTractographyResults*& result); - /** Take over general information for Patient, Study, Series and/or Frame of Reference + /** CAUTION: Parameter order (readFoR and readSeries) changed! + * Take over general information for Patient, Study, Series and/or Frame of Reference * from existing file * @param filename The filename to read from - * @param usePatient If OFTrue, Patient level information is imported - * @param useStudy If OFTrue, Study level information is imported - * @param useSeries If OFTrue, Series level information is imported - * @param useFoR If OFTrue, Frame of Reference information is imported + * @param readPatient If OFTrue, Patient level information is imported + * @param readStudy If OFTrue, Study level information is imported + * @param readFoR If OFTrue, Frame of Reference information is imported + * @param readSeries If OFTrue, Series level information is imported; if OFTrue, + * readFoR is also set to OFTrue. * @param updateCommonInstanceReferences If OFTrue (default), all * references in the Common Instance Reference Module will be updated * using the reference data provided earlier in the create() call. The @@ -82,11 +84,11 @@ public: * @return EC_Normal if reading was successful (i.e.\ if any information could * be read), otherwise an error is returned */ - virtual OFCondition importPatientStudyFoR(const OFString& filename, - const OFBool usePatient, - const OFBool useStudy, - const OFBool useSeries, - const OFBool useFoR = OFFalse, + virtual OFCondition importHierarchy(const OFString& filename, + const OFBool readPatient, + const OFBool readStudy, + const OFBool readFoR = OFFalse, + const OFBool readSeries = OFFalse, const OFBool updateCommonInstanceReferences = OFTrue); /** Add Track Set to object. If successful, the resulting Track Set can be @@ -272,7 +274,7 @@ private: /// Instance Sequence. However, in the case of Common Instance Reference, the /// internal reference structure is distinguishes between reference within /// the same study as "this" object as well as other objects outside this study. - /// If the user calls later importPatientStudyFoR() after creation, the study + /// If the user calls later importHierarchy() after creation, the study /// is most likely to change (away from the automatically created new study when /// calling create() to the imported study information) which requires to /// re-build the Common Instance Refernence Module's references. Thus, this diff --git a/dcmtract/libsrc/trcstatistic.cc b/dcmtract/libsrc/trcstatistic.cc old mode 100755 new mode 100644 diff --git a/dcmtract/libsrc/trctractographyresults.cc b/dcmtract/libsrc/trctractographyresults.cc index 0cfe9416..cfb7c496 100644 --- a/dcmtract/libsrc/trctractographyresults.cc +++ b/dcmtract/libsrc/trctractographyresults.cc @@ -215,12 +215,12 @@ OFCondition TrcTractographyResults::write(DcmItem &dataset) } -OFCondition TrcTractographyResults::importPatientStudyFoR( +OFCondition TrcTractographyResults::importHierarchy( const OFString& filename, - const OFBool usePatient, - const OFBool useStudy, - const OFBool useSeries, - const OFBool useFoR, + const OFBool readPatient, + const OFBool readStudy, + const OFBool readFoR, + const OFBool readSeries, const OFBool updateCommonInstanceReferences) { DcmFileFormat dcmff; @@ -230,7 +230,7 @@ OFCondition TrcTractographyResults::importPatientStudyFoR( DcmDataset *dset = dcmff.getDataset(); if (dset != NULL) { - result = import(*dset, usePatient, useStudy, useSeries, useFoR); + result = DcmIODCommon::importHierarchy(*dset, readPatient, readStudy, readFoR, readSeries); if (result.good() && updateCommonInstanceReferences) { getCommonInstanceReference().clearData(); diff --git a/dcmwlm/data/CMakeLists.txt b/dcmwlm/data/CMakeLists.txt index c1f4160d..8e16ed81 100644 --- a/dcmwlm/data/CMakeLists.txt +++ b/dcmwlm/data/CMakeLists.txt @@ -1,2 +1,2 @@ # declare directories to be installed -INSTALL(DIRECTORY wlistdb wlistqry DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data) +INSTALL(DIRECTORY wlistdb wlistqry DESTINATION "${CMAKE_INSTALL_DATADIR}/dcmtk" COMPONENT data) diff --git a/dcmwlm/include/CMakeLists.txt b/dcmwlm/include/CMakeLists.txt index c20211ce..e6ea5973 100644 --- a/dcmwlm/include/CMakeLists.txt +++ b/dcmwlm/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmwlm DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmwlm DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h b/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h index eb90f4e5..23aa7e7d 100644 --- a/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h +++ b/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h @@ -155,6 +155,22 @@ class DCMTK_DCMWLM_EXPORT WlmFileSystemInteractionManager */ OFBool MatchSequences( DcmSequenceOfItems& candidate, DcmSequenceOfItems& query, const MatchingKeys& matchingKeys ); + /** Determine if the sequences elements are universal matching. + * @param query The query sequence. + * @param matchingKeys The matching keys to regard. + * @param normalize normalize each element value. Defaults to OFTrue. + * @param enableWildCardMatching enable or disable wild card matching. Defaults to OFTrue, + * which means wild card matching is performed if the element's VR supports it. Set to + * OFFalse to force single value matching instead. + * @return returns OFTrue if sequence has no items or the element of the items are all empty or, + * if enableWildCardMatching is enabled, containing only wildcard chars. + * Returns OFFalse otherwise. + */ + OFBool isUniversalMatchingSequences( DcmSequenceOfItems& query, + const MatchingKeys& matchingKeys, + const OFBool normalize = OFTrue, + const OFBool enableWildCardMatching = OFTrue ); + /** This function returns OFTrue, if the matching key attribute values in the * dataset match the matching key attribute values in the search mask. * @param dataset The dataset which shall be checked. diff --git a/dcmwlm/libsrc/wlfsim.cc b/dcmwlm/libsrc/wlfsim.cc index 38bdf13c..540c1540 100644 --- a/dcmwlm/libsrc/wlfsim.cc +++ b/dcmwlm/libsrc/wlfsim.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2017, OFFIS e.V. + * Copyright (C) 1996-2018, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -490,7 +490,7 @@ void WlmFileSystemInteractionManager::DetermineWorklistFiles( OFVector int ret = 0; // start a loop; in each iteration another directory entry is determined - long hFile = OFstatic_cast(long, _findfirst( (char*)searchname.c_str(), &fileData )); + intptr_t hFile = _findfirst( (char*)searchname.c_str(), &fileData ); while( hFile != -1L && ret == 0 ) { // if the current entry refers to a worklist file, do something @@ -828,6 +828,62 @@ OFBool WlmFileSystemInteractionManager::AttributeIsAbsentOrEmpty( DcmTagKey elem return( OFFalse ); } + +OFBool WlmFileSystemInteractionManager::isUniversalMatchingSequences( DcmSequenceOfItems& query, + const MatchingKeys& matchingKeys, + const OFBool normalize, + const OFBool enableWildcardMatching ) +{ + DcmItem* pQueryItem = OFstatic_cast( DcmItem*, query.nextInContainer( OFnullptr ) ); + if( pQueryItem ) { +#ifdef HAVE_CXX11 + for( auto& key : matchingKeys.keys ) + { +#else + // remove this bloated version of the code if C++11 ever becomes a requirement of DCMTK + for( OFVector >::const_iterator it = matchingKeys.keys.begin(); it != matchingKeys.keys.end(); ++it ) + { + const OFPair& key = *it; +#endif + DcmElement* query = OFnullptr; + if( pQueryItem->findAndGetElement( key.first, query, OFFalse ).good() && query && !query->isUniversalMatch( normalize, enableWildcardMatching ) ) + return OFFalse; + } + +#ifdef HAVE_CXX11 + for( auto& combinedKey : matchingKeys.combinedKeys ) + { +#else + // remove this bloated version of the code if C++11 ever becomes a requirement of DCMTK + for( OFVector >::const_iterator it = matchingKeys.combinedKeys.begin(); it != matchingKeys.combinedKeys.end(); ++it ) + { + const OFPair& combinedKey = *it; +#endif + DcmElement* query = OFnullptr; + if( pQueryItem->findAndGetElement( combinedKey.first, query, OFFalse ).good() && query && !query->isUniversalMatch( normalize, enableWildcardMatching ) ) + return OFFalse; + else if( pQueryItem->findAndGetElement( combinedKey.second, query, OFFalse ).good() && query && !query->isUniversalMatch( normalize, enableWildcardMatching ) ) + return OFFalse; + } + + // sequence matching +#ifdef HAVE_CXX11 + for( auto& sequenceKey : matchingKeys.sequenceKeys ) + { +#else + // remove this bloated version of the code if C++11 ever becomes a requirement of DCMTK + for( OFVector >::const_iterator it = matchingKeys.sequenceKeys.begin(); it != matchingKeys.sequenceKeys.end(); ++it ) + { + const OFPair& sequenceKey = *it; +#endif + DcmElement* query = OFnullptr; + if( pQueryItem->findAndGetElement( sequenceKey.first, query, OFFalse ).good() && query && query->ident() == EVR_SQ && !isUniversalMatchingSequences( OFstatic_cast( DcmSequenceOfItems&, *query ), sequenceKey.second, normalize, enableWildcardMatching ) ) + return OFFalse; + } + } + return OFTrue; +} + OFBool WlmFileSystemInteractionManager::MatchSequences( DcmSequenceOfItems& candidate, DcmSequenceOfItems& query, const MatchingKeys& matchingKeys ) @@ -865,7 +921,7 @@ OFBool WlmFileSystemInteractionManager::DatasetMatchesSearchMask( DcmItem *datas const OFPair& key = *it; #endif DcmElement* query = OFnullptr; - if( searchMask->findAndGetElement( key.first, query, OFFalse ).good() && query ) + if( searchMask->findAndGetElement( key.first, query, OFFalse ).good() && query && !query->isUniversalMatch() ) { DcmElement* candidate = OFnullptr; if( dataset->findAndGetElement( key.first, candidate, OFFalse ).bad() || !candidate || !query->matches( *candidate, key.second ) ) @@ -883,7 +939,7 @@ OFBool WlmFileSystemInteractionManager::DatasetMatchesSearchMask( DcmItem *datas const OFPair& combinedKey = *it; #endif DcmElement* query = OFnullptr; - if( searchMask->findAndGetElement( combinedKey.first, query, OFFalse ).good() && query ) + if( searchMask->findAndGetElement( combinedKey.first, query, OFFalse ).good() && query && !query->isUniversalMatch() ) { DcmElement* candidate = OFnullptr; if( dataset->findAndGetElement( combinedKey.first, candidate, OFFalse ).bad() || !candidate ) @@ -900,7 +956,7 @@ OFBool WlmFileSystemInteractionManager::DatasetMatchesSearchMask( DcmItem *datas return OFFalse; } } - else if( searchMask->findAndGetElement( combinedKey.second, query, OFFalse ).good() && query ) + else if( searchMask->findAndGetElement( combinedKey.second, query, OFFalse ).good() && query && !query->isUniversalMatch() ) { DcmElement* candidate = OFnullptr; if( dataset->findAndGetElement( combinedKey.second, candidate, OFFalse ).bad() || !candidate || !query->matches( *candidate ) ) @@ -920,7 +976,7 @@ OFBool WlmFileSystemInteractionManager::DatasetMatchesSearchMask( DcmItem *datas const OFPair& sequenceKey = *it; #endif DcmElement* query = OFnullptr; - if( searchMask->findAndGetElement( sequenceKey.first, query, OFFalse ).good() && query && query->ident() == EVR_SQ && !OFstatic_cast( DcmSequenceOfItems*, query )->isEmpty() ) + if( searchMask->findAndGetElement( sequenceKey.first, query, OFFalse ).good() && query && query->ident() == EVR_SQ && !isUniversalMatchingSequences( OFstatic_cast( DcmSequenceOfItems&, *query ), sequenceKey.second ) ) { DcmElement* candidate = OFnullptr; if( dataset->findAndGetElement( sequenceKey.first, candidate, OFFalse ).bad() || !candidate || candidate->ident() != EVR_SQ || !MatchSequences( OFstatic_cast( DcmSequenceOfItems&, *candidate ), OFstatic_cast( DcmSequenceOfItems&, *query ), sequenceKey.second ) ) diff --git a/docs/ANNOUNCE.362 b/docs/ANNOUNCE.362 new file mode 100644 index 00000000..ec1aeddc --- /dev/null +++ b/docs/ANNOUNCE.362 @@ -0,0 +1,346 @@ +ANNOUNCEMENT + +Version 3.6.2 of the OFFIS DCMTK (DICOM ToolKit) software is now available for +public release. This release includes the following main changes over the +previous version 3.6.0: + +- DCMTK 3.6.2 builds correctly on older and up-to-date versions of GNU gcc + (4.2.1 to 7.1.1) Clang (3.4.1 to 4.0.1), Microsoft Visual Studio (2005 to + 2017) and SunPro CC (5.14 and 5.15). + +- Tested with the following operating systems/environments: + + - Android on arm64 + - Cygwin on x86_64 + - FreeBSD on x86_64 + - Linux on x86_64 and x86 + - MacOS X on x86_64 + - NetBSD on x86_64 + - OpenBSD on x86_64 + - OpenIndiana on x86 + - QNX on x86 + - Solaris on x86 + - Windows (and MinGW) on x86_64 and x86 + + For a complete list of tested systems and compilers, see the INSTALL file. + +- The CMake build system is now considered as mature as our GNU Autoconf + setup. There are even some features that are only available when using CMake, + for example exporting the build configuration in order to easily integrate + DCMTK into other CMake based projects. + +- It is now possible to build shared libraries (Linux) resp. dynamic link + libraries (DLLs, Windows) using CMake and the "BUILD_SHARED_LIBS" option. + DCMTK can even be compiled into a single shared library (e.g. "dcmtk.dll") + using the "BUILD_SINGLE_SHARED_LIBRARY" option. + +- Added character set transcoding support: + + - Support for converting DICOM files, datasets and element values between + different character sets (incl. code extension techniques). + - Windows-specific support for converting between wide character encoding and + e.g. UTF-8 or Latin-1. + - Support for wide character strings (UTF-16) used for filenames by the + Windows operating system. + - Supports replacing the underlying character set conversion implementation as + needed using either: + - GNU libiconv, + - International Components for Unicode (ICU) or + - the iconv functions from the C standard library. + - "dcmqrdb" allows matching queries with datasets using different character + sets and response conversion. + +- Integrated a unit test framework and added several unit tests to ensure that + basic functionality (e.g. parsing DICOM data, network transmission) will + never break. + +- Updated CharLS to version 1.0 and log4cplus to version 1.1.0. + +- Added cross compiling support for Windows and Android targets. The Android + emulator and Wine have been integrated into our CMake setup for running the + run time configuration tests as required and (optionally) the unit tests. + +- Refactored native STL integration: + + - Added arguments resp. variables to Autoconf and CMake replacing the old + macros for choosing whether to use DCMTK's fallback or the native + implementation of various STL features. See the INSTALL file for more + information about this. + - Added configuration tests ensuring that the enabled STL features work as + expected/required before actually using them. + - Added unit tests to ensure whichever chosen implementation actually works. + +- Added support for several C++11 (and newer) features and fallback + implementations as required: + + - Added arguments resp. variables to Autoconf and CMake for enabling native + C++11 support or DCMTK's own fallback implementations and workarounds. See + the INSTALL file for more information. + - Added configuration tests that ensure that the compiler actually provides + C++11 support before using it. + - Added advanced memory management primitives OFunique_ptr and OFshared_ptr + to support users in writing memory leak free code. + - Added support for move semantics, e.g. to transfer the ownership of an + OFunique_ptr. + - Added OFnumeric_limits to query information about fundamental arithmetic + types. + - Added type traits (OFenable_if etc.) to support template meta-programing. + - Added OFtuple as a more generic alternative to OFPair. + - Added OFoptional to connect the state information of optional values with + the actual value, e.g. for being used as function return value. + - Added OFvariant, a type safe tagged union to store different objects in + a single variable (not simultaneously) depending on runtime requirements. + - Added unit tests to ensure all above mentioned features really work. + +- Introduced platform independent defines for suppressing inappropriate compiler + diagnostic output (i.e. "warnings"). This mechanism is used to locally + suppress warnings that originate from the compiler misinterpreting the authors + intention, e.g. warnings when intentionally mixing "class" and "struct" for + template specialization to save typing "public" and "private". + +- Introduced several new modules: + + - "dcmrt" - implements support for the DICOM Radiation Therapy IODs + - "dcmiod" - eases IOD module composition and supports constraint checking + when reading and writing IODs and their modules. + - "dcmfg" - allows to represent Functional Groups in the source code. + - "dcmseg" - implements the segmentation IOD based on "dcmiod" and "dcmfg". + - "dcmtract" - offers a dedicated API to create and read DICOM Tractography + Results objects (introduced in DICOM Supplement 181). + - "dcmpmap" - for creating, saving and loading DICOM Parametric Maps objects + (introduced with Supplement 172). + +- Further enhanced DICOM Structured Reporting (SR) module "dcmsr": + + - Added the "dcmsr/cmr" submodule implementing support for parts of the DICOM + Content Mapping Resource (DCMR). + - Added support for SR templates by introducing two general classes for root + and non-root templates. + - Also added support for CP-1031 (Support long code values) and CP-1417 + (Clarify use and declaration of private mapping resource). + - Added support for the SR Template TID 1500 (Measurement Report) and included + subordinated Templates (e.g. TID 1001, 1204, 1600, 1411). + - Also added support for all required Context Groups and Code definitions, i.e. + from DICOM, NCIt, SNOMED, UCUM, and UMLS coding scheme. + - Added support for the new Acquisition Context SR IOD, Comprehensive 3D SR + IOD, Implantation Plan SR Document IOD, Radiopharmaceutical Radiation Dose + SR IOD, Simplified Adult Echo SR IOD and Spectacle Prescription Report IOD. + - Further improved handling of incorrectly encoded DICOM SR documents. + - Many further improvements in order to stay up-to-date with development of + the DICOM standard and to make it easier to create, read, write, and modify + SR documents. + +- Introduced several new command line tools: + + - "getscu" - a C-GET Service Class User. + - "dcmsend" - a Simple Storage Service Class User, based on new class + "DcmStorageSCU". + - "dcmrecv" - alternative to storescp with focus on easy use, based on new + class "DcmStorageSCP". + - "dcm2json" - converts DICOM files to DICOM's official JSON encoding. + +- Added threading functionality to DcmSCP via thread pool classes. + +- Added new output format to dcm2xml: the Native DICOM Model according to + part 19 of the DICOM standard ("Application Hosting"). + +- Added support for 16 bits per sample to PNG image export. + +- Significantly enhanced performance of the DICOMDIR code for reading and + writing such files. Also added support for all new Directory Record Types. + +- Added support for new Return Key Attributes to the "wlmscpfs", which are + required for the IHE Eye Care Workflow. + +- Introduced advanced parameterization methods for DCMTLS. + +- Improved data dictionary configuration options and handling. + +- Added support for new Value Representations "Other Double" (OD), "Other Long" + (OL), "Unlimited Characters" (UC) and "Universal Resource Identifiers/Locators + (URI/URL)" (UR). + +- Added support for three new DICOS Storage SOP Classes from the DICOM-related + DICOS (Digital Imaging and Communications in Security) standard. + +- Added additional matching keys to dcmqrdb and dcmwlm: StudyDate, StudyTime and + IssuerOfPatientID. + +- Updated data dictionary, SOP Class and Transfer Syntax UIDs for the recently + approved changes to the DICOM standard (i.e. Supplements and CPs), up to DICOM + standard release DICOM 2017b. + +- Added support for additional MPEG4 transfer syntaxes to several command line + programs. + +- Enhanced support for DICOM Non-Patient Objects, e.g. allow for transferring + them using the standard networking tools. + +- DCMTK now supports compiling with OpenSSL 1.1.x; support for some older, + insecure TLS cipher suites has been removed. + +- The JPEG encoder now implements DICOM CP 1447, i.e. always writes a SOF1 + marker into the JPEG bitstream in extended sequential mode. + +- The socket timeout used for send() and recv() is now configurable (at + runtime); further fixes and enhancements to networking basics. + +- Revised implementation of class OFCondition in order to avoid issues with + static initialization order. + +- Fixed various issues that occurred after the official 3.6.0 release. + + +Many people have contributed to this new release of DCMTK, appearing here in +alphabetical order. Thank you very much for your support! + + Alexander Haderer + Alexander Karaivanov + Andrei Terechko + Andrey Fedorov + Anne-Gaelle Berge + Bhuvan Bose + Bill Lorensen + Brad Jascob + Bruno Milutin + Carmen Avram + Christian Fremgen + Christian Herz + Christian Wetzel + Daniele Giunchi + David Clunie + Detlev Hohmeier + Dimitri Papadopoulos + Dr. Martin Korp + Dr. Michael Heber + Eric A. Borisch + David Flade + Fred Stegemann + Fu Peng + Gareth Sylvester-Bradley + Gary Carter + Gigante + Grzegorz Chlebus + Hanno Hugenberg + Hans J. Johnson + Hans Kluijtmans + Hector Marco + Heyo Spekker + Huseyin Kozan + Ing-Long Eric Kuo + Jean-Christophe Fillion-Robin + Jeroen Eggermont + John Stark + Julien Finet + Kent Williams + Kornelius Sohn + Lin Qi Ruan + Marco Nolden + Mario Ceresa + Markus Konrad + Markus Mertens + Martin Wenger + Mathieu Malaterre + Matt McCormick + Michael Knopke + Michael Schinner + Michal Spacek + Niels Dekker + Paolo Marcheschi + Per Inge Mathisen + Peter Hille + Peter Klotz + Pietro Cerutti + Rasmus Christian Pedersen + Richard Flay + Robert Habrich + Stacy Loesch + Takeo Satomi + Tamas Nemeth + Thomas Puckett + Thomas Sondergaard + Tiago D'Agostini + Tilman Vogel + Timothy Pitt + Waldir Pimenta + Wang Qiang + Yves Neumann + + Forum user "AlexanderLysenko" + Forum user "andreasb" + Forum user "angad" + Forum user "aprogrammer" + Forum user "bibble_235" + Forum user "budric" + Forum user "chaircrusher" + Forum user "coach4ae" + Forum user "dimitri" + Forum user "flang" + Forum user "Geof" + Forum user "gerhardh" + Forum user "ghleclerc" + Forum user "HackerNeo" + Forum user "henry" + Forum user "Hua Cong Danh" + Forum user "ichimura.t" + Forum user "ionut.vaida" + Forum user "jacobf" + Forum user "jacobscolin" + Forum user "jakecobb" + Forum user "kosborn" + Forum user "kron24" + Forum user "lars_matthaeus" + Forum user "Luuk" + Forum user "maleike" + Forum user "martinrame" + Forum user "Matterhorn" + Forum user "merlin" + Forum user "michael12345" + Forum user "nikkoara" + Forum user "nmoraes" + Forum user "oblivion81" + Forum user "oxymoron" + Forum user "Paul Groot" + Forum user "Per" + Forum user "poupofa" + Forum user "psih128" + Forum user "Rich in Soquel" + Forum user "sfzhang" + Forum user "Shaeto" + Forum user "spasmous" + Forum user "st80rules" + Forum user "Tim" + Forum user "tpalagyi" + Forum user "vlad" + Forum user "vsalomoni" + Forum user "wollet88" + Forum user "wrenashe" + Forum user "xcoder" + Forum user "ymartelli" + Forum user "yueran" + Forum user "Yves Neumann" + Forum user "zaq" + +Members of the DCMTK Team who have worked on this release are +(in alphabetical order): + + Marco Eichelberg + Michael Onken + Joerg Riesmeier + Jan Schlamelcher + +Student associates: + + Nikolas Goldhammer + Sebastian Grallert + Thorben Hasenpusch + Uli Schlachter + +Also see CREDITS file for projects and companies who have been generously +supporting DCMTK. + +The DCMTK software can be downloaded via: + + http://dicom.offis.de/dcmtk or http://www.dcmtk.org/ + +OFFIS e.V., Oldenburg, Germany, 2017-07-14 diff --git a/docs/CHANGES.363 b/docs/CHANGES.363 new file mode 100644 index 00000000..f7ef368f --- /dev/null +++ b/docs/CHANGES.363 @@ -0,0 +1,2093 @@ + +Release 3.6.3 (Public Minor Release - 2018-02-05) + +**** Changes from 2018.02.05 (schlamelcher) + +- Created CHANGES.363 for DCMTK release 3.6.3: + CHANGES.363 contains the Git commit history since DCMTK release 3.6.2. + Added: docs/CHANGES.363 + +- Updated man pages for DCMTK release 3.6.3. + Affects: doxygen/manpages/man1/dcm2json.1 + doxygen/manpages/man1/dcm2pdf.1 + doxygen/manpages/man1/dcm2pnm.1 + doxygen/manpages/man1/dcm2xml.1 + doxygen/manpages/man1/dcmcjpeg.1 + doxygen/manpages/man1/dcmcjpls.1 + doxygen/manpages/man1/dcmconv.1 + doxygen/manpages/man1/dcmcrle.1 + doxygen/manpages/man1/dcmdjpeg.1 + doxygen/manpages/man1/dcmdjpls.1 + doxygen/manpages/man1/dcmdrle.1 + doxygen/manpages/man1/dcmdspfn.1 + doxygen/manpages/man1/dcmdump.1 + doxygen/manpages/man1/dcmftest.1 + doxygen/manpages/man1/dcmgpdir.1 + doxygen/manpages/man1/dcmj2pnm.1 + doxygen/manpages/man1/dcml2pnm.1 + doxygen/manpages/man1/dcmmkcrv.1 + doxygen/manpages/man1/dcmmkdir.1 + doxygen/manpages/man1/dcmmklut.1 + doxygen/manpages/man1/dcmodify.1 + doxygen/manpages/man1/dcmp2pgm.1 + doxygen/manpages/man1/dcmprscp.1 + doxygen/manpages/man1/dcmprscu.1 + doxygen/manpages/man1/dcmpschk.1 + doxygen/manpages/man1/dcmpsmk.1 + doxygen/manpages/man1/dcmpsprt.1 + doxygen/manpages/man1/dcmpsrcv.1 + doxygen/manpages/man1/dcmpssnd.1 + doxygen/manpages/man1/dcmqridx.1 + doxygen/manpages/man1/dcmqrscp.1 + doxygen/manpages/man1/dcmqrti.1 + doxygen/manpages/man1/dcmquant.1 + doxygen/manpages/man1/dcmrecv.1 + doxygen/manpages/man1/dcmscale.1 + doxygen/manpages/man1/dcmsend.1 + doxygen/manpages/man1/dcmsign.1 + doxygen/manpages/man1/dcod2lum.1 + doxygen/manpages/man1/dconvlum.1 + doxygen/manpages/man1/drtdump.1 + doxygen/manpages/man1/dsr2html.1 + doxygen/manpages/man1/dsr2xml.1 + doxygen/manpages/man1/dsrdump.1 + doxygen/manpages/man1/dump2dcm.1 + doxygen/manpages/man1/echoscu.1 + doxygen/manpages/man1/findscu.1 + doxygen/manpages/man1/getscu.1 + doxygen/manpages/man1/img2dcm.1 + doxygen/manpages/man1/movescu.1 + doxygen/manpages/man1/pdf2dcm.1 + doxygen/manpages/man1/storescp.1 + doxygen/manpages/man1/storescu.1 + doxygen/manpages/man1/termscu.1 + doxygen/manpages/man1/wlmscpfs.1 + doxygen/manpages/man1/xml2dcm.1 + doxygen/manpages/man1/xml2dsr.1 + +- Updated version information for DCMTK release 3.6.3. + Affects: CMake/dcmtkPrepare.cmake + VERSION + config/configure + config/configure.in + +- Added a missing contributor to ANNOUNCE. + Affects: ANNOUNCE + +- Minor enhancements regarding previous commit. + Affects: INSTALL + +- Updated Makefile dependencies. + Affects: dcmdata/libi2d/Makefile.dep + dcmdata/libsrc/Makefile.dep + dcmfg/libsrc/Makefile.dep + dcmimgle/libsrc/Makefile.dep + dcmiod/libsrc/Makefile.dep + dcmnet/apps/Makefile.dep + dcmnet/libsrc/Makefile.dep + dcmpstat/libsrc/Makefile.dep + dcmrt/libsrc/Makefile.dep + dcmsr/libcmr/Makefile.dep + dcmtls/libsrc/Makefile.dep + oflog/libsrc/Makefile.dep + +- Updated ANNOUNCE and INSTALL for DCMTK release 3.6.3. + Affects: ANNOUNCE + INSTALL + +**** Changes from 2018.02.02 (schlamelcher) + +- Another fix for configure. + Affects: config/rootconf + configure + +- Enhanced deprecation warning for configure. + Affects: config/rootconf + configure + +- Added deprecation warning for configure: + Added deprecation warning for GNU Autoconf based configure that will be + removed in a future release. + Affects: config/rootconf + configure + +- Added missing configuration test to CMake: + Added missing configuration test for HAVE_OLD_READDIR_R to CMake, fixing + problems under Solaris. + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/osconfig.h.in + +**** Changes from 2018.02.01 (schlamelcher) + +- Fixed installing OpenSSL DLLs (Windows). + Affects: dcmnet/apps/CMakeLists.txt + +**** Changes from 2018.01.31 (schlamelcher) + +- Fixed domain names resolving to unsupported IPv6: + Fixed domain names accidentally resolving to IPv6 addresses that are + incompatible with the constructed socket used in the call to connect(). + This caused commands like 'echoscu localhost' to fail on some systems that + use IPv6 addresses as their default. + Affects: dcmnet/include/dcmtk/dcmnet/dul.h + dcmnet/libsrc/dulfsm.cc + ofstd/libsrc/ofstd.cc + +**** Changes from 2018.01.31 (riesmeier) + +- Fixed typo in parameter name. + Affects: dcmwlm/libsrc/wlfsim.cc + +- Removed trailing spaces. + Affects: dcmtls/docs/certstor.txt + +**** Changes from 2018.01.30 (grallert) + +- Fixed universal matching of missing values in dcmwlm: + The matching algorithm in dcmwlm now handles query attributes that are + semantically equivalent to Universal Matching (as identified by + DcmElement::isUniversalMatch) as a special case that does not require the + respective attribute to be present in the candidate data set. + Affects: dcmwlm/include/dcmtk/dcmwlm/wlfsim.h + dcmwlm/libsrc/wlfsim.cc + +- Introduced DcmElement::isUniversalMatch(): + The function isUniversalMatch() allows to determine whether a QR or Worklist + query attribute is semantically equivalent to an empty value, e.g. consists + only of a single wildcard character. + Affects: dcmdata/include/dcmtk/dcmdata/dcchrstr.h + dcmdata/include/dcmtk/dcmdata/dcelem.h + dcmdata/include/dcmtk/dcmdata/dcvrae.h + dcmdata/include/dcmtk/dcmdata/dcvrat.h + dcmdata/include/dcmtk/dcmdata/dcvrcs.h + dcmdata/include/dcmtk/dcmdata/dcvrur.h + dcmdata/include/dcmtk/dcmdata/dcvrus.h + dcmdata/libsrc/dcchrstr.cc + dcmdata/libsrc/dcelem.cc + dcmdata/libsrc/dcvrae.cc + dcmdata/libsrc/dcvrat.cc + dcmdata/libsrc/dcvrcs.cc + dcmdata/libsrc/dcvrur.cc + +**** Changes from 2018.01.30 (schlamelcher) + +- Another workaround for the unit tests / CMake < 3.0. + Affects: CMake/dcmtkMacros.cmake + +**** Changes from 2018.01.30 (eichelberg) + +- Added certstor.txt to makefiles. + Affects: dcmtls/docs/CMakeLists.txt + dcmtls/docs/Makefile.in + +- Added documentation on the CA cert management options. + Added: dcmtls/docs/certstor.txt + +**** Changes from 2018.01.29 (eichelberg) + +- Fixed unused variable warning. + Affects: dcmnet/libsrc/dul.cc + +- Fixed bug in poll() related code. + Affects: dcmnet/libsrc/dul.cc + +**** Changes from 2018.01.26 (eichelberg) + +- Fixed NULL pointer dereference in dcmqrscp: + Fixed NULL pointer dereference occuring if a zero byte was present + in the wrong place in a dcmqrscp configuration file. + Thanks to GwanYeong Kim for the bug report + and sample dataset. + Affects: dcmqrdb/libsrc/dcmqrcnf.cc + +**** Changes from 2018.01.24 (riesmeier) + +- Updated latest tested CMake version: + Updated information on latest CMake version that has been tested to "3.10.2". + Affects: CMake/dcmtkPrepare.cmake + INSTALL + +**** Changes from 2018.01.22 (riesmeier) + +- Added --extract-xml-single option to findscu: + Added --extract-xml-single option to findscu and enhanced the underlying C++ + class accordingly. This new option allows for extracting all C-FIND-Response + datasets of an association to a single XML file. If character set conversion + is available, all datasets are converted to UTF-8 (in order to avoid issues + when different character sets are used). See documentation for details. + Affects: dcmnet/apps/findscu.cc + dcmnet/docs/findscu.man + dcmnet/include/dcmtk/dcmnet/dfindscu.h + dcmnet/libsrc/dfindscu.cc + +**** Changes from 2018.01.18 (riesmeier) + +- Added --extract-xml option to findscu: + Added --extract-xml option to findscu and enhanced the underlying C++ class + accordingly. For this reason, the "extractResponses" parameter (no. 13) of + the DcmFindSCU::performQuery() method has been changed from OFBool to an enum. + This closes DCMTK Feature #308. + Affects: dcmnet/apps/findscu.cc + dcmnet/docs/findscu.man + dcmnet/include/dcmtk/dcmnet/dfindscu.h + dcmnet/libsrc/dfindscu.cc + +**** Changes from 2018.01.18 (schlamelcher) + +- Added a workaround for CMake versions prior 3.x.x: + Added a workaround for yesterday's commit regarding the unit tests and CMake + generator expressions. CMake versions prior 3.x.x do not understand $ + and require using $, which is in turn deprecated since 3.x.x. + Good thing this issue was totally not annoying. + Affects: CMake/dcmtkMacros.cmake + CMake/dcmtkPrepare.cmake + CMakeLists.txt + +**** Changes from 2018.01.17 (schlamelcher) + +- Enhanced the way the unit tests are executed (CMake): + The unit tests are now added using add_test(NAME ...) instead of the old + add_test() command. This enables using generator expressions to dynamically + resolve the location of the test executables. + Also ensured that the test-exhaustive targets pass $, which is + required for setups that use this mechanism (e.g. Visual Studio). + Closes DCMTK bug #783. + Affects: CMake/CTest/dcmtkCTestRun.cmake.in + CMake/CTest/dcmtkCTestRunAndroid.cmake.in + CMake/CTest/dcmtkCTestRunExhaustive.cmake + CMake/CTest/dcmtkCTestRunWine.cmake.in + CMake/dcmtkMacros.cmake + CMakeLists.txt + +**** Changes from 2018.01.15 (eichelberg) + +- Now using poll() to handle DICOM network connections: + On platforms where poll() is available, DCMTK now handles incoming DICOM + network connections using poll() instead of select(). This is because + select() is known to crash on Linux when handling more than 1024 + parallel network connections. + Thanks to Michael Craggs for the bug + report and patch. + This closes DCMTK bug #798. + Affects: dcmnet/libsrc/assoc.cc + dcmnet/libsrc/dcmtrans.cc + dcmnet/libsrc/dul.cc + dcmnet/libsrc/dulextra.cc + dcmnet/libsrc/dulfsm.cc + dcmtls/libsrc/tlstrans.cc + +- Added new autoconf/cmake test for : + Added a new test in the autoconf and the CMake build that checks if + is available and treats MacOS X as a special case because + poll() is broken in several MacOS X versions and should thus not be used. + Thanks to Michael Craggs + for the suggestion and the CMake implementation. + Affects: CMake/GenerateDCMTKConfigure.cmake + config/aclocal.m4 + config/configure + config/configure.in + config/confmod + config/include/dcmtk/config/osconfig.h.in + +**** Changes from 2018.01.11 (riesmeier) + +- Updated references to current DICOM edition. + Affects: dcmsr/include/dcmtk/dcmsr/dsrimgvl.h + dcmsr/include/dcmtk/dcmsr/dsrwavvl.h + dcmsr/libsrc/dsracqcc.cc + dcmsr/libsrc/dsrimgvl.cc + dcmsr/libsrc/dsrwavvl.cc + +- Added comment on double use of Defined Term: + Added comment on double use of Defined Term "JAW" for Body Part Examined. + Affects: dcmsr/libcmr/cid4031e.cc + +**** Changes from 2018.01.10 (riesmeier) + +- Updated mapping of Body Part Examined to codes: + Updated mapping of the Defined Terms for Body Part Examined (0018,0015) to + associated CID 4031 (Common Anatomic Regions) codes based on PS3.16 Table L-1 + (2017e edition of the DICOM standards). + This closes DCMTK Conformance #794. + Affects: dcmsr/libcmr/cid4031e.cc + +- Added comments, e.g. on what TODO. + Affects: dcmdata/libsrc/dcelem.cc + +**** Changes from 2018.01.06 (eichelberg) + +- Minor changes to avoid warnings on MSVC x64. + Affects: dcmdata/apps/xml2dcm.cc + +- Added parentheses to avoid Clang warning. + Affects: dcmjpeg/libijg12/jdcoefct.c + dcmjpeg/libijg16/jdcoefct.c + dcmjpeg/libijg8/jdcoefct.c + +- Added explicit typecast to avoid MSVC warning. + Affects: dcmnet/tests/tscuscp.cc + +**** Changes from 2018.01.05 (riesmeier) + +- Added a warning on unused parameter "bitmap-out": + Report a warning message if the second command line parameter (bitmap-out) + is specified although option --no-output is used. + Affects: dcmimage/apps/dcm2pnm.cc + +- Enhanced robustness of getUncompressedFrameSize(): + Enhanced robustness and verboseness of getUncompressedFrameSize() method. + Now, it is checked whether mandatory data elements such as BitsAllocated + and SamplesPerPixel are present and have a valid value. If not, a warning + is reported to the logger and a more appropriate condition code is returned. + This closes DCMTK Feature #587. + Affects: dcmdata/include/dcmtk/dcmdata/dcelem.h + dcmdata/libsrc/dcelem.cc + +- Output warning for inappropriate element length: + Output a warning message if the value of the length field is inappropriate + for the VR when reading a data element from a DICOM dataset, e.g. 2 bytes + for FL (Floating Point Single). + Affects: dcmdata/libsrc/dcitem.cc + +- Fixed output to debug logger. + Affects: dcmimgle/include/dcmtk/dcmimgle/diinpxt.h + +- Fixed various typos in comments and log output. + Affects: dcmdata/apps/mdfconen.cc + dcmdata/apps/mdfconen.h + dcmdata/apps/xml2dcm.cc + dcmdata/include/dcmtk/dcmdata/dcmatch.h + dcmdata/libsrc/dcitem.cc + dcmdata/libsrc/dcvrobow.cc + dcmdata/tests/tparser.cc + +- Double-check length field in print() method: + Double-check length field for valid value in print() method and output + "(invalid value)" in case the length is less than the structure size in + bytes, e.g. 2 for an OF value. This follows the approach introduced with + the previous commit (for OB/OW values). + Affects: dcmdata/libsrc/dcvrfd.cc + dcmdata/libsrc/dcvrfl.cc + dcmdata/libsrc/dcvrsl.cc + dcmdata/libsrc/dcvrss.cc + dcmdata/libsrc/dcvrul.cc + dcmdata/libsrc/dcvrus.cc + +- Fixed possible buffer overflow in print() method: + Fixed possible buffer overflow in DcmOtherByteOtherWord::print() method, + e.g. when processing an invalid OW value with an element length of 1. + Thanks to GwanYeong Kim for the report and sample + dataset. + Affects: dcmdata/libsrc/dcvrobow.cc + +**** Changes from 2017.12.23 (eichelberg) + +- Completed documentation for class OFSockAddr. + Affects: ofstd/include/dcmtk/ofstd/ofsockad.h + +- Minor improvements in class OFSockAddr. + Affects: ofstd/libsrc/ofsockad.cc + +- Minor change to avoid warning on MSVC. + Affects: oflog/libsrc/tls.cc + +**** Changes from 2017.12.22 (schlamelcher) + +- Added some '*' to @code sections in Doxygen comments: + Added some '*' prefixes that had previously been removed as a workaround for a + bug in some old versions of Doxygen. Newer Doxygen versions reliably parse + these characters as intended. + Affects: dcmdata/include/dcmtk/dcmdata/dcjson.h + dcmdata/include/dcmtk/dcmdata/dcmatch.h + +**** Changes from 2017.12.21 (eichelberg) + +- Added crypt32 to OpenSSL libraries on Win32: + Starting with OpenSSL 1.1.0, the Windows crypt32 library is needed for + a static link of OpenSSL. This library has now been added to the + CMake OPENSSL_LIBS. + Thanks to Helmut Steiner for the report and suggestion. + Affects: CMake/3rdparty.cmake + +- Fixed problem with missing inet_ntop() on VS2015: + Thanks to Sergei Khlutchin for the bug report and fix. + Affects: ofstd/libsrc/ofsockad.cc + +**** Changes from 2017.12.20 (riesmeier) + +- Fixed issue with uninitialized memory buffer: + Fixed an issue with an uninitialized memory buffer when processing + monochrome DICOM images with invalid data element values in the Image + Pixel Module. For example, when the value of BitsAllocated was too high, + parts of the memory buffer that stores the intermediate representation + of the pixel data did not get initialized (even though it should have + been "zeroed"). + Thanks to GwanYeong Kim for the original report. + Affects: dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h + +**** Changes from 2017.12.20 (schlamelcher) + +- Added override DcmPixelItem::calcElementLength(): + DcmPixelItem now overrides DcmElement::calcElementLength(), fixing an issue + where the Item Tag header was sometimes incorrectly assumed to be 12 bytes + wide instead of eight. + Thanks to Peter Klotz for the report and his + assistance with testing the solution. + Affects: dcmdata/include/dcmtk/dcmdata/dcpxitem.h + dcmdata/libsrc/dcpxitem.cc + +**** Changes from 2017.12.19 (onken) + +- Allow serialization of an empty dataset: + This patch allows the serialization of an empty (e.g. + default-constructed) DcmDataset object. + Thanks to Peter Klotz for the suggested + patch. + Affects: dcmdata/include/dcmtk/dcmdata/dcostrmb.h + dcmdata/libsrc/dcostrmb.cc + +**** Changes from 2017.12.15 (riesmeier) + +- Reuse pre-computed size of tag header. + Affects: dcmdata/libsrc/dcitem.cc + +- Added test case "dcmsr_gotoParentUntilRoot": + Added another test case that checks whether gotoParent() called in a loop + really sets the cursor to the root node of the tree. + Affects: dcmsr/tests/tests.cc + dcmsr/tests/tsrtree.cc + +**** Changes from 2017.12.13 (riesmeier) + +- Fixed further buffer overruns in writeXML(): + Fixed further possible buffer overruns in writeXML() for VRs with a structure + size of more than 1 byte. Used the same approach as for "OF" (commit b524e87). + Affects: dcmdata/libsrc/dcvrobow.cc + dcmdata/libsrc/dcvrod.cc + dcmdata/libsrc/dcvrof.cc + dcmdata/libsrc/dcvrol.cc + +- Fixed possibly wrong calculation of value count: + The method getVM() cannot be used for VR classes such as FL, FD and UL to + determine the number of stored values because derived classes (i.e. OF, OD + and OL) always return 1 (since this is how the Value Multiplicity is defined + for these Value Representations). Also enhanced the comment explaining this. + Affects: dcmdata/libsrc/dcvrfd.cc + dcmdata/libsrc/dcvrfl.cc + dcmdata/libsrc/dcvrul.cc + +**** Changes from 2017.12.13 (eichelberg) + +- Converted tabs to whitespace. + Affects: dcmdata/libsrc/dcvrof.cc + +- Fixed buffer overrrun in DcmOtherFloat::writeXML(): + Fixed buffer overrun in DcmOtherFloat::writeXML() that occured if + an invalid element with VR=OF and Length=2 is present in the dataset + that is converted to XML. + Thanks to Gwan Yeong Kim for the bug report. + Affects: dcmdata/libsrc/dcvrof.cc + +**** Changes from 2017.12.12 (schlamelcher) + +- Modified recently introduced OFrvalue_ref_upcast: + Modified C++11 implementation of OFrvalue_ref_upcast to also work around + issues with older versions of GCC in addition to being a work around for move + emulation for pre C++11 compilers. + Affects: ofstd/include/dcmtk/ofstd/ofutil.h + +**** Changes from 2017.12.12 (riesmeier) + +- Avoid double definition of WIN32_LEAN_AND_MEAN: + Check whether WIN32_LEAN_AND_MEAN is already defined before defining it in + a header file. This should avoid compiler warnings on "macro redefinition" + reported by VisualStudio (Windows) in case this macro is already defined + somewhere else. + Thanks to Peter Klotz for the report and fix. + Affects: dcmnet/include/dcmtk/dcmnet/dcompat.h + ofstd/include/dcmtk/ofstd/ofgrp.h + ofstd/include/dcmtk/ofstd/ofmem.h + ofstd/include/dcmtk/ofstd/ofpwd.h + +- Added option --socket-timeout to echoscu: + Added option --socket-timeout to echoscu (as already done for e.g. storescu). + Thanks to Michael Craggs for the suggested + patch. + This partly closed DCMTK Feature #711. + Affects: dcmnet/apps/Makefile.dep + dcmnet/apps/echoscu.cc + dcmnet/docs/echoscu.man + +- Use stringstream for dynamic command line options: + Use the same approach as for other command line tools: use a stringstream + to prepare the output text of command line options when variable content + is needed (e.g. for timeouts). For AE titles, the pre-processor macros can + be used directly within the character string. + Affects: dcmnet/apps/echoscu.cc + +**** Changes from 2017.12.08 (schlamelcher) + +- Made OFrvalue_ref_upcast a bit more robust. + Affects: ofstd/include/dcmtk/ofstd/ofutil.h + +- Fixed a syntax error in yesterday's commit. + Affects: dcmtls/libsrc/tlslayer.cc + +**** Changes from 2017.12.07 (schlamelcher) + +- Fixed compiling DcmTLSTransportLayer with C++11. + Affects: dcmtls/libsrc/tlslayer.cc + +- Introduced helper macro OFrvalue_ref_upcast. + Affects: ofstd/include/dcmtk/ofstd/ofutil.h + +- Added a missing include. + Affects: dcmtls/libsrc/tlscond.cc + +**** Changes from 2017.12.07 (riesmeier) + +- Removed double definition of retired attributes: + Removed double definition of retired DICOM attributes, i.e. those that can be + extracted automatically from part 6 and 7 of the DICOM standard are no longer + added manually at the end of the dictionary file. + This also fixes the status of Destination AE (2100,0140), which had been + retired in the past but this retirement has been withdrawn (apparently). + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + dcmpstat/libsrc/dvpssp.cc + +**** Changes from 2017.12.05 (riesmeier) + +- Updated "dcmrt" classes based on DICOM 2017e: + Updated automatically generated IOD and sequence C++ classes for the various + RT objects based on the current edition of the DICOM standard (2017e). + Also fixed three attribute definitions that are used in the RT Beams Module + and that were marked as "retired". This was apparently true some years ago + but not anymore according to the current edition of the DICOM standard. + Added: dcmrt/include/dcmtk/dcmrt/seq/drtcsrs.h + dcmrt/libsrc/drtcsrs.cc + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + dcmrt/apps/Makefile.dep + dcmrt/include/dcmtk/dcmrt/drtdose.h + dcmrt/include/dcmtk/dcmrt/drtimage.h + dcmrt/include/dcmtk/dcmrt/drtionpl.h + dcmrt/include/dcmtk/dcmrt/drtiontr.h + dcmrt/include/dcmtk/dcmrt/drtplan.h + dcmrt/include/dcmtk/dcmrt/drtstrct.h + dcmrt/include/dcmtk/dcmrt/drttreat.h + dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtads.h + dcmrt/include/dcmtk/dcmrt/seq/drtafs.h + dcmrt/include/dcmtk/dcmrt/seq/drtags.h + dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtas1.h + dcmrt/include/dcmtk/dcmrt/seq/drtas5.h + dcmrt/include/dcmtk/dcmrt/seq/drtas6.h + dcmrt/include/dcmtk/dcmrt/seq/drtas7.h + dcmrt/include/dcmtk/dcmrt/seq/drtass.h + dcmrt/include/dcmtk/dcmrt/seq/drtbads.h + dcmrt/include/dcmtk/dcmrt/seq/drtbas.h + dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h + dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h + dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h + dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h + dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h + dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h + dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h + dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h + dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h + dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h + dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtbs.h + dcmrt/include/dcmtk/dcmrt/seq/drtbss.h + dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h + dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h + dcmrt/include/dcmtk/dcmrt/seq/drtccs.h + dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h + dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtces.h + dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h + dcmrt/include/dcmtk/dcmrt/seq/drtchs.h + dcmrt/include/dcmtk/dcmrt/seq/drtcims.h + dcmrt/include/dcmtk/dcmrt/seq/drtcis.h + dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h + dcmrt/include/dcmtk/dcmrt/seq/drtcos.h + dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h + dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h + dcmrt/include/dcmtk/dcmrt/seq/drtcps.h + dcmrt/include/dcmtk/dcmrt/seq/drtcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h + dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h + dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h + dcmrt/include/dcmtk/dcmrt/seq/drtcss.h + dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h + dcmrt/include/dcmtk/dcmrt/seq/drtddps.h + dcmrt/include/dcmtk/dcmrt/seq/drtdias.h + dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h + dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtds.h + dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtdss.h + dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h + dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h + dcmrt/include/dcmtk/dcmrt/seq/drteas.h + dcmrt/include/dcmtk/dcmrt/seq/drtecs.h + dcmrt/include/dcmtk/dcmrt/seq/drtes.h + dcmrt/include/dcmtk/dcmrt/seq/drtfds.h + dcmrt/include/dcmtk/dcmrt/seq/drtfes.h + dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h + dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h + dcmrt/include/dcmtk/dcmrt/seq/drtfms.h + dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h + dcmrt/include/dcmtk/dcmrt/seq/drtgas.h + dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtgms.h + dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h + dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtiais.h + dcmrt/include/dcmtk/dcmrt/seq/drtians.h + dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h + dcmrt/include/dcmtk/dcmrt/seq/drtibls.h + dcmrt/include/dcmtk/dcmrt/seq/drtibs.h + dcmrt/include/dcmtk/dcmrt/seq/drticpds.h + dcmrt/include/dcmtk/dcmrt/seq/drticps.h + dcmrt/include/dcmtk/dcmrt/seq/drtics.h + dcmrt/include/dcmtk/dcmrt/seq/drtiis.h + dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h + dcmrt/include/dcmtk/dcmrt/seq/drtircs.h + dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h + dcmrt/include/dcmtk/dcmrt/seq/drtitts.h + dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h + dcmrt/include/dcmtk/dcmrt/seq/drtiws.h + dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h + dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h + dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h + dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h + dcmrt/include/dcmtk/dcmrt/seq/drtmas.h + dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtmls.h + dcmrt/include/dcmtk/dcmrt/seq/drtmps.h + dcmrt/include/dcmtk/dcmrt/seq/drtmris.h + dcmrt/include/dcmtk/dcmrt/seq/drtmss.h + dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h + dcmrt/include/dcmtk/dcmrt/seq/drtoas.h + dcmrt/include/dcmtk/dcmrt/seq/drtois.h + dcmrt/include/dcmtk/dcmrt/seq/drtopis.h + dcmrt/include/dcmtk/dcmrt/seq/drtos.h + dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h + dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h + dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h + dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h + dcmrt/include/dcmtk/dcmrt/seq/drtpics.h + dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtporis.h + dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h + dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h + dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h + dcmrt/include/dcmtk/dcmrt/seq/drtpss.h + dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h + dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h + dcmrt/include/dcmtk/dcmrt/seq/drtqds.h + dcmrt/include/dcmtk/dcmrt/seq/drtras.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h + dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h + dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h + dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h + dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h + dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h + dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h + dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h + dcmrt/include/dcmtk/dcmrt/seq/drtrds.h + dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h + dcmrt/include/dcmtk/dcmrt/seq/drtrics.h + dcmrt/include/dcmtk/dcmrt/seq/drtrims.h + dcmrt/include/dcmtk/dcmrt/seq/drtris.h + dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h + dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrms.h + dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h + dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h + dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h + dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h + dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h + dcmrt/include/dcmtk/dcmrt/seq/drtrps.h + dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h + dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h + dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h + dcmrt/include/dcmtk/dcmrt/seq/drtrros.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h + dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h + dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h + dcmrt/include/dcmtk/dcmrt/seq/drtrses.h + dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h + dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h + dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h + dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h + dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h + dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtrss.h + dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h + dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h + dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h + dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h + dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h + dcmrt/include/dcmtk/dcmrt/seq/drtrws.h + dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h + dcmrt/include/dcmtk/dcmrt/seq/drtscris.h + dcmrt/include/dcmtk/dcmrt/seq/drtscs.h + dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtsds.h + dcmrt/include/dcmtk/dcmrt/seq/drtshds.h + dcmrt/include/dcmtk/dcmrt/seq/drtsins.h + dcmrt/include/dcmtk/dcmrt/seq/drtsis.h + dcmrt/include/dcmtk/dcmrt/seq/drtsns.h + dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h + dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h + dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtss.h + dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h + dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtsss.h + dcmrt/include/dcmtk/dcmrt/seq/drttms0.h + dcmrt/include/dcmtk/dcmrt/seq/drttms9.h + dcmrt/include/dcmtk/dcmrt/seq/drttscds.h + dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h + dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h + dcmrt/include/dcmtk/dcmrt/seq/drttts.h + dcmrt/include/dcmtk/dcmrt/seq/drtudis.h + dcmrt/include/dcmtk/dcmrt/seq/drtvls.h + dcmrt/include/dcmtk/dcmrt/seq/drtwps.h + dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h + dcmrt/include/dcmtk/dcmrt/seq/drtws.h + dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h + dcmrt/libsrc/CMakeLists.txt + dcmrt/libsrc/Makefile.dep + dcmrt/libsrc/Makefile.in + dcmrt/libsrc/drtaadcs.cc + dcmrt/libsrc/drtadcs.cc + dcmrt/libsrc/drtads.cc + dcmrt/libsrc/drtafs.cc + dcmrt/libsrc/drtags.cc + dcmrt/libsrc/drtajcs.cc + dcmrt/libsrc/drtas1.cc + dcmrt/libsrc/drtas5.cc + dcmrt/libsrc/drtas6.cc + dcmrt/libsrc/drtas7.cc + dcmrt/libsrc/drtass.cc + dcmrt/libsrc/drtbads.cc + dcmrt/libsrc/drtbas.cc + dcmrt/libsrc/drtbcps.cc + dcmrt/libsrc/drtbl2.cc + dcmrt/libsrc/drtbl5.cc + dcmrt/libsrc/drtbldls.cc + dcmrt/libsrc/drtbldps.cc + dcmrt/libsrc/drtblds1.cc + dcmrt/libsrc/drtblds5.cc + dcmrt/libsrc/drtblds6.cc + dcmrt/libsrc/drtbldts.cc + dcmrt/libsrc/drtbrcss.cc + dcmrt/libsrc/drtbrdrs.cc + dcmrt/libsrc/drtbrs.cc + dcmrt/libsrc/drtbs.cc + dcmrt/libsrc/drtbss.cc + dcmrt/libsrc/drtbvcps.cc + dcmrt/libsrc/drtcbars.cc + dcmrt/libsrc/drtccs.cc + dcmrt/libsrc/drtcctus.cc + dcmrt/libsrc/drtcdrs.cc + dcmrt/libsrc/drtces.cc + dcmrt/libsrc/drtcgis.cc + dcmrt/libsrc/drtchs.cc + dcmrt/libsrc/drtcims.cc + dcmrt/libsrc/drtcis.cc + dcmrt/libsrc/drtcncs.cc + dcmrt/libsrc/drtcos.cc + dcmrt/libsrc/drtcpas.cc + dcmrt/libsrc/drtcpis.cc + dcmrt/libsrc/drtcps.cc + dcmrt/libsrc/drtcs.cc + dcmrt/libsrc/drtcsas.cc + dcmrt/libsrc/drtcshs.cc + dcmrt/libsrc/drtcsis.cc + dcmrt/libsrc/drtcss.cc + dcmrt/libsrc/drtdcs.cc + dcmrt/libsrc/drtdddps.cc + dcmrt/libsrc/drtddps.cc + dcmrt/libsrc/drtdias.cc + dcmrt/libsrc/drtdimcs.cc + dcmrt/libsrc/drtdimrs.cc + dcmrt/libsrc/drtdirs.cc + dcmrt/libsrc/drtdose.cc + dcmrt/libsrc/drtdrs.cc + dcmrt/libsrc/drtds.cc + dcmrt/libsrc/drtdspcs.cc + dcmrt/libsrc/drtdss.cc + dcmrt/libsrc/drtdvhs.cc + dcmrt/libsrc/drtdvrrs.cc + dcmrt/libsrc/drteas.cc + dcmrt/libsrc/drtecs.cc + dcmrt/libsrc/drtes.cc + dcmrt/libsrc/drtfds.cc + dcmrt/libsrc/drtfes.cc + dcmrt/libsrc/drtfgs.cc + dcmrt/libsrc/drtfgss.cc + dcmrt/libsrc/drtfms.cc + dcmrt/libsrc/drtfsss.cc + dcmrt/libsrc/drtgas.cc + dcmrt/libsrc/drtgmcs.cc + dcmrt/libsrc/drtgms.cc + dcmrt/libsrc/drtgpis.cc + dcmrt/libsrc/drthsdrs.cc + dcmrt/libsrc/drtiais.cc + dcmrt/libsrc/drtians.cc + dcmrt/libsrc/drtiblds.cc + dcmrt/libsrc/drtibls.cc + dcmrt/libsrc/drtibs.cc + dcmrt/libsrc/drticpds.cc + dcmrt/libsrc/drticps.cc + dcmrt/libsrc/drtics.cc + dcmrt/libsrc/drtiis.cc + dcmrt/libsrc/drtimage.cc + dcmrt/libsrc/drtionpl.cc + dcmrt/libsrc/drtiontr.cc + dcmrt/libsrc/drtipiqs.cc + dcmrt/libsrc/drtircs.cc + dcmrt/libsrc/drtiseis.cc + dcmrt/libsrc/drtitts.cc + dcmrt/libsrc/drtiwps.cc + dcmrt/libsrc/drtiws.cc + dcmrt/libsrc/drtlsds.cc + dcmrt/libsrc/drtlsds6.cc + dcmrt/libsrc/drtlsds7.cc + dcmrt/libsrc/drtmacds.cc + dcmrt/libsrc/drtmas.cc + dcmrt/libsrc/drtmdrs.cc + dcmrt/libsrc/drtmls.cc + dcmrt/libsrc/drtmps.cc + dcmrt/libsrc/drtmris.cc + dcmrt/libsrc/drtmss.cc + dcmrt/libsrc/drtmucs.cc + dcmrt/libsrc/drtoas.cc + dcmrt/libsrc/drtois.cc + dcmrt/libsrc/drtopis.cc + dcmrt/libsrc/drtos.cc + dcmrt/libsrc/drtpbcs.cc + dcmrt/libsrc/drtpcs.cc + dcmrt/libsrc/drtpcxs.cc + dcmrt/libsrc/drtpdecs.cc + dcmrt/libsrc/drtpdeds.cc + dcmrt/libsrc/drtpfms.cc + dcmrt/libsrc/drtpics.cc + dcmrt/libsrc/drtplan.cc + dcmrt/libsrc/drtporcs.cc + dcmrt/libsrc/drtporis.cc + dcmrt/libsrc/drtppcs.cc + dcmrt/libsrc/drtprsis.cc + dcmrt/libsrc/drtpscs.cc + dcmrt/libsrc/drtpsics.cc + dcmrt/libsrc/drtpss.cc + dcmrt/libsrc/drtpsss.cc + dcmrt/libsrc/drtpvis.cc + dcmrt/libsrc/drtqds.cc + dcmrt/libsrc/drtras.cc + dcmrt/libsrc/drtrbas2.cc + dcmrt/libsrc/drtrbas8.cc + dcmrt/libsrc/drtrbls.cc + dcmrt/libsrc/drtrbos1.cc + dcmrt/libsrc/drtrbos6.cc + dcmrt/libsrc/drtrbos7.cc + dcmrt/libsrc/drtrbs2.cc + dcmrt/libsrc/drtrbs4.cc + dcmrt/libsrc/drtrbs8.cc + dcmrt/libsrc/drtrcdrs.cc + dcmrt/libsrc/drtrcos.cc + dcmrt/libsrc/drtrcps.cc + dcmrt/libsrc/drtrcs.cc + dcmrt/libsrc/drtrdros.cc + dcmrt/libsrc/drtrdrs1.cc + dcmrt/libsrc/drtrdrs6.cc + dcmrt/libsrc/drtrdrs8.cc + dcmrt/libsrc/drtrds.cc + dcmrt/libsrc/drtrecs.cc + dcmrt/libsrc/drtrfgs.cc + dcmrt/libsrc/drtrfors.cc + dcmrt/libsrc/drtrics.cc + dcmrt/libsrc/drtrims.cc + dcmrt/libsrc/drtris.cc + dcmrt/libsrc/drtrlsds.cc + dcmrt/libsrc/drtrmdrs.cc + dcmrt/libsrc/drtrms.cc + dcmrt/libsrc/drtrmss6.cc + dcmrt/libsrc/drtrmss7.cc + dcmrt/libsrc/drtrpcs.cc + dcmrt/libsrc/drtrpis.cc + dcmrt/libsrc/drtrppcs.cc + dcmrt/libsrc/drtrpphs.cc + dcmrt/libsrc/drtrpps.cc + dcmrt/libsrc/drtrppss.cc + dcmrt/libsrc/drtrps.cc + dcmrt/libsrc/drtrris1.cc + dcmrt/libsrc/drtrris6.cc + dcmrt/libsrc/drtrris9.cc + dcmrt/libsrc/drtrrms.cc + dcmrt/libsrc/drtrros.cc + dcmrt/libsrc/drtrrpcs.cc + dcmrt/libsrc/drtrrros.cc + dcmrt/libsrc/drtrrs.cc + dcmrt/libsrc/drtrrshs.cc + dcmrt/libsrc/drtrrtps.cc + dcmrt/libsrc/drtrrtps3.cc + dcmrt/libsrc/drtrrtps4.cc + dcmrt/libsrc/drtrrtps5.cc + dcmrt/libsrc/drtrscs.cc + dcmrt/libsrc/drtrsers.cc + dcmrt/libsrc/drtrses.cc + dcmrt/libsrc/drtrshs.cc + dcmrt/libsrc/drtrshs6.cc + dcmrt/libsrc/drtrshs7.cc + dcmrt/libsrc/drtrsis.cc + dcmrt/libsrc/drtrsns.cc + dcmrt/libsrc/drtrsos.cc + dcmrt/libsrc/drtrsrs.cc + dcmrt/libsrc/drtrss.cc + dcmrt/libsrc/drtrsss.cc + dcmrt/libsrc/drtrsts.cc + dcmrt/libsrc/drtrtrs2.cc + dcmrt/libsrc/drtrtrs4.cc + dcmrt/libsrc/drtrvis.cc + dcmrt/libsrc/drtrws.cc + dcmrt/libsrc/drtrwvms.cc + dcmrt/libsrc/drtscris.cc + dcmrt/libsrc/drtscs.cc + dcmrt/libsrc/drtsdcs.cc + dcmrt/libsrc/drtsds.cc + dcmrt/libsrc/drtshds.cc + dcmrt/libsrc/drtsins.cc + dcmrt/libsrc/drtsis.cc + dcmrt/libsrc/drtsns.cc + dcmrt/libsrc/drtspccs.cc + dcmrt/libsrc/drtspcs.cc + dcmrt/libsrc/drtspgis.cc + dcmrt/libsrc/drtsptcs.cc + dcmrt/libsrc/drtss.cc + dcmrt/libsrc/drtssrcs.cc + dcmrt/libsrc/drtssrs.cc + dcmrt/libsrc/drtsss.cc + dcmrt/libsrc/drtstrct.cc + dcmrt/libsrc/drttms0.cc + dcmrt/libsrc/drttms9.cc + dcmrt/libsrc/drttreat.cc + dcmrt/libsrc/drttscds.cc + dcmrt/libsrc/drttsibs.cc + dcmrt/libsrc/drttsmds.cc + dcmrt/libsrc/drttts.cc + dcmrt/libsrc/drtudis.cc + dcmrt/libsrc/drtvls.cc + dcmrt/libsrc/drtwps.cc + dcmrt/libsrc/drtwrs.cc + dcmrt/libsrc/drtwrsrs.cc + dcmrt/libsrc/drtws.cc + dcmrt/libsrc/drtxrs.cc + dcmrt/tests/Makefile.dep + +- Updated code definitions for DICOM 2017e: + Updated automatically generated code definitions for coding scheme "DCM", + "NCIt" and "UMLS" for the 2017e edition of the DICOM standard. For the + two latter ones, there were no changes. + Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h + dcmsr/include/dcmtk/dcmsr/codes/ncit.h + dcmsr/include/dcmtk/dcmsr/codes/umls.h + +**** Changes from 2017.12.04 (onken) + +- Fixed writing of fractional segmentations: + Fixed writing of fractional segmentations caused by doubled if clause. + Thanks to Martin Strunz for the report. + Affects: dcmseg/libsrc/segdoc.cc + +**** Changes from 2017.11.27 (onken) + +- Enforce macro ENABLE_EXTERNAL_DICTIONARY: + The macro ENABLE_EXTERNAL_DICTIONARY has been configurable via CMake and + Autoconf but has not been enforced in the code. Conversely, the macro + DONT_LOAD_EXTERNAL_DICTIONARIES existed which has been used in the code but + has not been configurable via CMake or Autoconf. + This commit enforces ENABLE_EXTERNAL_DICTIONARY, while + DONT_LOAD_EXTERNAL_DICTIONARIES is made deprecated leading to an error + when used in the build. + Affects: CMake/osconfig.h.in + config/configure + config/configure.in + config/confmod + config/docs/macros.txt + config/include/dcmtk/config/osconfig.h.in + dcmdata/libsrc/dcdict.cc + dcmnet/tests/Makefile.dep + +- Refactored/Fixed (Ident.) Pixel Value Transf. FG: + Refactored and fixed the (Identity) Pixel Value Transformation Functional + Group. The Identity version of the Functional Group sets fixed values for + Rescale Slope/Intercept/Type, and thus is a specialization of the regular + Pixel Value Transformation Functional Group. In order to use the existing + Identity version for both type of FGs, the code for the Identity version + has been generalized. + The original trigger for the fix was that it was undecidable for the FG + factory code to decide by the FG sequence tag which of both FGs to + instantiate (reflected by a faulty doubled if condition). Also, the file + has been renamed, so that name the reflects the more general Pixel Value + Transformation FG. + Fixed misleading code indentation reported by gcc. + Thanks to Martin Strunz for the report. + Added: dcmfg/include/dcmtk/dcmfg/fgpixeltransform.h + dcmfg/libsrc/fgpixeltransform.cc + Removed: dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h + dcmfg/libsrc/fgidentpixeltransform.cc + Affects: dcmfg/include/dcmtk/dcmfg/fgtypes.h + dcmfg/libsrc/CMakeLists.txt + dcmfg/libsrc/Makefile.dep + dcmfg/libsrc/Makefile.in + dcmfg/libsrc/fgfact.cc + dcmfg/libsrc/fginterface.cc + dcmfg/libsrc/fgtypes.cc + dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapbase.h + dcmpmap/libsrc/Makefile.dep + +- Fixed SCU/SCP test under 32 Bit Windows: + Fixed failing SCU/SCP test under 32 Bit Windows. However, the underyling + problem was more generic: The OFStandard::sleep() method and the methods + internally called on the different operating systems are not necessarily + sleeping the desired number of seconds but can return earlier, since + various signals or events (in this case: a connection timeout on the + network) can force sleep() to return earlier. The test has been fixed by + using a method that ensures sleep() sleeps at least for the desired time. + Further small test enhancements and documentation. + This fixes bug #789. + Affects: dcmnet/tests/tscuscp.cc + +**** Changes from 2017.11.24 (eichelberg) + +- Fixed warning about unused variable. + Affects: ofstd/libsrc/ofsockad.cc + +**** Changes from 2017.11.24 (onken) + +- Fixed CMake warning caused by CMP0005: + Fixed CMake warning caused by CMake policy CMP0005, that DCMTK uses to + enforce old CMake behaviour, in order to escape DCMTK's build date + string (DCMTK_BUILD_DATE). The policy rule has been moved to the place + where it is needed. DCMTK does not make use of escaping in + ADD_DEFINITION statements anywhere else, so this should be safe. + Thanks to Jean-Christophe Fillion-Robin + for the report and fix. + Affects: CMake/dcmtkPrepare.cmake + +- Fixed documentation mixing up Windows/Unix. + Affects: dcmnet/include/dcmtk/dcmnet/scp.h + +**** Changes from 2017.11.22 (onken) + +- Enhanced documentation: + Make sure that the term "host name" is only used if the actual name is + meant, not the IP. Otherwise, if IP should be included, the term "host" + is used. Also replaced occurrences of "hostname" with "host name". + Affects: dcmnet/include/dcmtk/dcmnet/scp.h + dcmnet/include/dcmtk/dcmnet/scpcfg.h + dcmnet/include/dcmtk/dcmnet/scu.h + dcmnet/libsrc/scp.cc + dcmnet/tests/tscuscp.cc + +**** Changes from 2017.11.21 (onken) + +- Make sure the calling host is being checked: + DcmSCP has a virtual method in order to check whether the calling host + should be accepted or not, so that derived classes could implement their + own acceptance policy for hosts. However, it turned out that this method + has not been called at all so far. Now the host is checked when + connecting. + Thanks to Domen Soklic for the report. + Affects: dcmnet/include/dcmtk/dcmnet/scp.h + dcmnet/libsrc/scp.cc + dcmnet/tests/tests.cc + dcmnet/tests/tscuscp.cc + +- Better error reporting for bad SCP configurations: + DcmSCP does now print better error messages in case the user forgot to + specify presentation contexts, or does provide invalid presentation + contexts. Also, a dedicated error code was introduced for those cases. + Added test to check this new feature. Enhanced documentation. + Thanks to forum user "Hafiz Rafeeq" for reporting the bad error message. + Affects: dcmnet/include/dcmtk/dcmnet/cond.h + dcmnet/include/dcmtk/dcmnet/scp.h + dcmnet/include/dcmtk/dcmnet/scpcfg.h + dcmnet/libsrc/cond.cc + dcmnet/libsrc/scp.cc + dcmnet/libsrc/scpcfg.cc + dcmnet/tests/tests.cc + dcmnet/tests/tscuscp.cc + +**** Changes from 2017.11.21 (eichelberg) + +- Now including on Windows. + Affects: dcmdata/libsrc/dcuid.cc + +- Minor changes needed for MSVC. + Affects: ofstd/libsrc/Makefile.dep + ofstd/libsrc/ofsockad.cc + ofstd/libsrc/ofstd.cc + +**** Changes from 2017.11.20 (onken) + +- Option enabling Verification on base class SCP: + An option was added to add Verification SOP Class support on the base + class server. Also documentation was added that per default DcmSCP does + not support any SOP Class at all in order to give the user full control + of the SOP Class negotiation behaviour. + Also, added related test and fixed some typos. + Thanks to forum user "Hafiz Rafeeq" for the report. + Affects: dcmnet/include/dcmtk/dcmnet/scp.h + dcmnet/libsrc/scp.cc + dcmnet/tests/tests.cc + dcmnet/tests/tscuscp.cc + +**** Changes from 2017.11.20 (schlamelcher) + +- Fixed DcmTLSOptions in case OpenSSL is not available: + Fixed the implementation of the new class DcmTLSOptions in case OpenSSL is not + available/disabled. + Affects: dcmtls/include/dcmtk/dcmtls/tlslayer.h + dcmtls/libsrc/tlsopt.cc + +**** Changes from 2017.11.20 (eichelberg) + +- This commit completes the previous one. + Affects: dcmdata/libsrc/Makefile.dep + dcmdata/libsrc/dcuid.cc + dcmnet/libsrc/Makefile.dep + dcmnet/libsrc/dul.cc + dcmnet/libsrc/dulfsm.cc + dcmpstat/libsrc/Makefile.dep + dcmpstat/libsrc/dvpsmsg.cc + ofstd/include/dcmtk/ofstd/ofstd.h + ofstd/libsrc/Makefile.dep + ofstd/libsrc/ofstd.cc + +- Ported code to OFStandard::getAddressByHostname(): + All modules in DCMTK now use OFStandard::getAddressByHostname() (which is + "IPv6 safe" instead of the older OFStandard::getHostByName() method, + which has been removed together with the OFStandard::OFHostent helper class. + This closes DCMTK bug #714. + Removed: ofstd/include/dcmtk/ofstd/ofnetdb.h + +- Minor changes in class OFSockAddr: + Added method OFSockAddr::setPort() and fixed port number shown by the + related operator<<(), which did not account for network byte order. + Affects: ofstd/include/dcmtk/ofstd/ofsockad.h + ofstd/libsrc/ofsockad.cc + +- Further changes needed for MinGW. + Affects: dcmnet/include/dcmtk/dcmnet/dcompat.h + ofstd/libsrc/ofsockad.cc + +- Update Makefile dependencies. + Affects: dcmdata/apps/Makefile.dep + dcmsr/apps/Makefile.dep + dcmsr/libsrc/Makefile.dep + +**** Changes from 2017.11.19 (eichelberg) + +- Changes needed to compile oflog on MinGW. + Affects: oflog/include/dcmtk/oflog/config/win32.h + oflog/libsrc/Makefile.in + +- New configure tests for lib iphlpapi and ws2_32: + Added configure tests for lib iphlpapi and ws2_32, needed on MinGW. + Affects: config/configure + config/configure.in + +- Updated autoconf test TYPE_SOCKLEN_T for MinGW. + Affects: config/configure + config/configure.in + config/confmod + +- Updated Makefile dependencie. + Affects: dcmdata/apps/Makefile.dep + dcmdata/libsrc/Makefile.dep + dcmnet/libsrc/Makefile.dep + dcmpstat/libsrc/Makefile.dep + dcmsr/apps/Makefile.dep + dcmsr/libsrc/Makefile.dep + dcmtls/libsrc/Makefile.dep + +- Added typecast needed for older MSVC versions. + Affects: ofstd/libsrc/ofsockad.cc + +**** Changes from 2017.11.18 (eichelberg) + +- Including on Windows, for IPv6 structs. + Affects: ofstd/libsrc/ofsockad.cc + ofstd/libsrc/ofstd.cc + +- Changed file mode to 644 for some files. + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/dcmtkTestCharSignedness.cc + dcmdata/include/dcmtk/dcmdata/dcjson.h + dcmiod/include/dcmtk/dcmiod/cielabutil.h + dcmiod/libsrc/cielabutil.cc + dcmiod/libsrc/iodreferences.cc + dcmtract/include/dcmtk/dcmtract/trcstatistic.h + dcmtract/libsrc/trcstatistic.cc + ofstd/include/dcmtk/ofstd/variadic/variant.h + +**** Changes from 2017.11.17 (eichelberg) + +- Added new function OFStandard::getAddressByHostname: + Added a new function OFStandard::getAddressByHostname() that performs + a DNS lookup of an IP address based on a hostname and is "IPv6 safe". + This function uses the protocol independent getaddrinfo(3) function if + available instead of gethostbyname() or gethostbyname_r(). + Added: ofstd/include/dcmtk/ofstd/ofsockad.h + ofstd/libsrc/ofsockad.cc + Affects: ofstd/include/dcmtk/ofstd/ofstd.h + ofstd/libsrc/CMakeLists.txt + ofstd/libsrc/Makefile.dep + ofstd/libsrc/Makefile.in + ofstd/libsrc/ofstd.cc + ofstd/tests/Makefile.dep + +**** Changes from 2017.11.17 (riesmeier) + +- Refer to CID 7006 for Purpose of Reference Code: + Added reference to Defined Context Group 7006 (SR Document Purposes of + Reference) for the Purpose of Reference Code to the API documentation of + getReferencedInstances(). + Affects: dcmsr/include/dcmtk/dcmsr/dsrdoc.h + +**** Changes from 2017.11.16 (schlamelcher) + +- Introduced DcmTLSOptions and related error conditions: + Introduced DcmTLSOptions, a class for managing the command line options that + control the behavior of DCMTLS. DcmTLSOptions handles storing the relevant + options, printing the associated help text an information (e.g. OpenSSL + library version), parsing and evaluating the given command line arguments and + creating a DcmTLSTransportLayer object based on the collected information. + Furthermore the new file tlscond.h has been added, declaring error conditions + for the things that might go wrong within DcmTLSOptions instead of simply + printing whatever message via OFLog directly. + Added: dcmtls/include/dcmtk/dcmtls/tlscond.h + dcmtls/include/dcmtk/dcmtls/tlsopt.h + dcmtls/libsrc/tlscond.cc + dcmtls/libsrc/tlsopt.cc + Affects: dcmtls/libsrc/CMakeLists.txt + dcmtls/libsrc/Makefile.in + +- Refactored DcmTransportLayer and DcmTLSTransportLayer: + Enhanced ownership semantics and consistency of DcmTransportLayer and + DcmTLSTransportLayer. + - Both classes can now be default constructed, e.g. to create a placeholder + object on the stack and avoid creating the object on the heap via 'new'. + - Both objects now support move semantics to transfer the ownership of any + used resources, e.g. for being able to setup a transport layer in a + easy to use method that passes the created object as return value. + - DcmTLSTransportLayer now uses its base DcmTransportLayer to create a + connection if no encrypted connection was requested - removes duplicated + "copy and paste" code. + Affects: dcmnet/include/dcmtk/dcmnet/dcmlayer.h + dcmtls/include/dcmtk/dcmtls/tlslayer.h + dcmtls/libsrc/tlslayer.cc + +- Added move support for pre C++11 OFvariant: + Added move constructor and move assignment operator + to the fallback (pre C++11) implementation of + OFvariant. + Affects: ofstd/include/dcmtk/ofstd/ofvriant.h + ofstd/include/dcmtk/ofstd/variadic/variant.h + +**** Changes from 2017.11.15 (eichelberg) + +- Use getnameinfo() for reverse DNS lookups: + Added a new function OFStandard::getHostnameByAddress() that performs + a reverse DNS lookup of a hostname based on an IP address. This function + uses the protocol independent getnameinfo(3) function if available instead + of gethostbyname() or gethostbyname_r(). + Removed function OFStandard::getHostByAddr(), which due to its interface + cannot be ported to use getnameinfo(3) and which is not used anymore + in the toolkit. + This closes DCMTK bug #715. + Affects: dcmnet/libsrc/dul.cc + ofstd/include/dcmtk/ofstd/ofstd.h + ofstd/libsrc/ofstd.cc + +**** Changes from 2017.11.09 (eichelberg) + +- Fixed return type for _findfirst(): + Fixed variable type for storing the result of _findfirst(), + which caused problems on 64-bit Windows builds. + This closes DCMTK bug #802. + Affects: dcmwlm/libsrc/wlfsim.cc + +**** Changes from 2017.11.02 (riesmeier) + +- Consistently use Command Priority "MEDIUM": + Consistently use the default value "MEDIUM" (0x00) for Priority (0000,0700) + in all DIMSE request messages, i.e. for C-STORE, C-FIND, C-GET and C-MOVE. + Before, some network tools and also the DcmSCU class used "LOW" (0x02) for + unknown reasons. + The Priority value is still "hard coded" (i.e. not configurable) since we + are not aware of any DICOM implementation that would make a difference on + the value of (0000,0700). + Affects: dcmnet/apps/storescu.cc + dcmnet/libsrc/dfindscu.cc + dcmnet/libsrc/scu.cc + dcmqrdb/libsrc/dcmqrtis.cc + +**** Changes from 2017.11.01 (riesmeier) + +- Fixed wrong warning message on odd offset value. + Affects: dcmdata/libsrc/dcpxitem.cc + +- Avoid possible 32-bit unsigned integer overflow: + Avoid possible 32-bit unsigned integer overflow when computing the values + of the Basic Offset Table (by using the helper OFStandard::safeAdd()). + This closes DCMTK Bug #797. + Affects: dcmdata/libsrc/dcpxitem.cc + +- Enhanced documentation of createOffsetTable(): + Enhanced documentation of parameter "offsetList" in method createOffsetTable() + of class DcmPixelItem. + This partly closes DCMTK Bug #797. + Affects: dcmdata/include/dcmtk/dcmdata/dcpxitem.h + +- Added short section on "DICOM Data Dictionary": + Added a short section on the "DICOM Data Dictionary" explaining the + different defaults on Unix and Windows systems. Further details can + be found in the corresponding documentation file ("datadict.txt"). + Affects: INSTALL + +**** Changes from 2017.10.26 (eichelberg) + +- Enabled new TLS versions when using OpenSSL < 1.1.0: + When compiling DCMTK with OpenSSL versions older than 1.1.0, we now use the + SSLv23 client and server methods instead of the TLSv1 methods because the + latter only accept TLS 1.0 connections and prevent the negotiation of newer + TLS versions. We use SSL_CTX_set_options() to disable SSLv2 and SSLv3. + Thanks to Peter Klotz for the suggested patch. + This closes DCMTK Feature #790. + Affects: dcmtls/libsrc/tlslayer.cc + +**** Changes from 2017.10.13 (riesmeier) + +- Fixed various typos in API documentation. + Affects: dcmdata/include/dcmtk/dcmdata/dcpixel.h + dcmdata/include/dcmtk/dcmdata/dcvrat.h + dcmdata/include/dcmtk/dcmdata/dcvrfd.h + dcmdata/include/dcmtk/dcmdata/dcvrfl.h + dcmdata/include/dcmtk/dcmdata/dcvris.h + dcmdata/include/dcmtk/dcmdata/dcvrobow.h + dcmdata/include/dcmtk/dcmdata/dcvrsl.h + dcmdata/include/dcmtk/dcmdata/dcvrss.h + dcmdata/include/dcmtk/dcmdata/dcvrul.h + dcmdata/include/dcmtk/dcmdata/dcvrus.h + +**** Changes from 2017.10.11 (riesmeier) + +- Do not pass simple const parameters by reference: + Avoid use of "const OFBool &" as a parameter to a function/method. Also + fixed various typos in comments and inconsistencies in API documentation. + Affects: dcmdata/apps/mdfdsman.cc + dcmdata/apps/mdfdsman.h + +**** Changes from 2017.10.11 (schlamelcher) + +- Refactored install using GNUInstallDirs CMake Module: + The installation directory structure controlling variables (DCMTK_INSTALL_XXX) + have been replaced by the ones defined by including the GNUInstallDirs CMake + module, in general: + DCMTK_INSTALL_XXXXXX -> CMAKE_INSTALL_XXXXXX + Some exceptions were necessary, namingly: + DCMTK_INSTALL_INCDIR -> CMAKE_INSTALL_INCLUDEDIR + DCMTK_INSTALL_ETCDIR -> CMAKE_INSTALL_SYSCONFDIR + DCMTK_INSTALL_DATDIR -> CMAKE_INSTALL_DATADIR + DCMTK_INSTALL_HTMDIR -> removed, controlled by CMAKE_INSTALL_DOCDIR + DCMTK_INSTALL_CMKDIR -> removed from cache, automatically set based + on CMAKE_INSTALL_LIBDIR (Unix) or set to + 'cmake' (Windows) + Furthermore, the semantics of the following variables differ slightly: + CMAKE_INSTALL_LIBDIR -> now automatically 'lib' or 'lib64' as appropriate + CMAKE_INSTALL_DATADIR -> not containing the 'dcmtk' part of the path + CMAKE_INSTALL_SYSCONFDIR -> not containing the 'dcmtk' part of the path + The minimum required CMake version has been increased 2.8.3 -> 2.8.5 since + GNUInstallDirs is only available in CMake >= 2.8.5. + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/dcmtkAfterModules.cmake + CMake/dcmtkMacros.cmake + CMake/dcmtkPrepare.cmake + CMakeLists.txt + config/docs/CMakeLists.txt + dcmdata/data/CMakeLists.txt + dcmdata/docs/CMakeLists.txt + dcmdata/include/CMakeLists.txt + dcmfg/include/CMakeLists.txt + dcmimage/include/CMakeLists.txt + dcmimgle/data/CMakeLists.txt + dcmimgle/include/CMakeLists.txt + dcmiod/include/CMakeLists.txt + dcmjpeg/include/CMakeLists.txt + dcmjpls/include/CMakeLists.txt + dcmnet/apps/CMakeLists.txt + dcmnet/docs/CMakeLists.txt + dcmnet/etc/CMakeLists.txt + dcmnet/include/CMakeLists.txt + dcmpmap/include/CMakeLists.txt + dcmpstat/data/CMakeLists.txt + dcmpstat/etc/CMakeLists.txt + dcmpstat/include/CMakeLists.txt + dcmqrdb/docs/CMakeLists.txt + dcmqrdb/etc/CMakeLists.txt + dcmqrdb/include/CMakeLists.txt + dcmrt/include/CMakeLists.txt + dcmseg/include/CMakeLists.txt + dcmsign/include/CMakeLists.txt + dcmsr/data/CMakeLists.txt + dcmsr/include/CMakeLists.txt + dcmtls/docs/CMakeLists.txt + dcmtls/include/CMakeLists.txt + dcmtract/include/CMakeLists.txt + dcmwlm/data/CMakeLists.txt + dcmwlm/include/CMakeLists.txt + doxygen/CMakeLists.txt + oflog/etc/CMakeLists.txt + oflog/include/CMakeLists.txt + ofstd/include/CMakeLists.txt + +**** Changes from 2017.10.02 (schlamelcher) + +- Suppressed inappropriate warnings in dcmatch.cc: + Suppressed inappropriate warnings about parameter name shadowing, see + documentation of the employed macro. + Affects: dcmdata/libsrc/dcmatch.cc + +- Added DCMTK version suffix to Autoconf and CMake: + Added '+' as the DCMTK version suffix for the Autoconf and CMake setup. + This changes the '--version' output of the command line applications to + clarify we are currently in post version 3.6.2 development and not pre. + Affects: CMake/dcmtkPrepare.cmake + config/configure + config/configure.in + +**** Changes from 2017.10.02 (onken) + +- Fixed listed object in GNU Makefiles: + Fixed missing functional group classes in dcmfg/libsrc/Makefile.in and + removed a doubled entry in dcmpmap/libsrc/Makefile.in. + Thanks to forum user "sfzhang" for the report. + Affects: dcmfg/libsrc/Makefile.in + dcmpmap/libsrc/Makefile.in + +**** Changes from 2017.10.02 (riesmeier) + +- Fixed MacOS X version information in INSTALL: + Fixed MacOS X version information in INSTALL file: use OS X instead of kernel + version, i.e. 10.10.4 instead of 14.4.0. + Affects: INSTALL + +**** Changes from 2017.09.29 (schlamelcher) + +- Clarified version information: + Modified version number "syntax" in VERSION to clarify we are currently doing + post version 3.6.2 development and not pre. + Affects: VERSION + +**** Changes from 2017.09.29 (onken) + +- Removed superfluous CMake policy setting: + Removed superfluous CMake policy setting that was needed for CMake 2.6. + However, now that DCMTK requires at least CMake 2.8.3, the policy is set + in any case automatically. + Also removed superfluous minimum CMake version 2.6 in dcmtkPrepare.cmake, + since the CMake minimum version is already set to 2.8.3 in + CMakeLists.txt root file. + Thanks to Jean-Christophe Fillion-Robin + for the report and fix. + Affects: CMake/dcmtkPrepare.cmake + +**** Changes from 2017.09.28 (riesmeier) + +- Fixed further typos (in comments). + Affects: dcmdata/include/dcmtk/dcmdata/dcpath.h + +**** Changes from 2017.09.28 (onken) + +- Fixed typos. + Affects: dcmdata/include/dcmtk/dcmdata/dcpath.h + +**** Changes from 2017.09.27 (riesmeier) + +- Move common descriptors to group level (TID 1600): + Added new method that allows for moving common image entry descriptors + automatically to their respective image group (within the Image Library, + i.e. TID 1600). This should significantly facilitate the use of the class + TID1600_ImageLibrary. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h + dcmsr/include/dcmtk/dcmsr/dsrdocst.h + dcmsr/include/dcmtk/dcmsr/dsrtree.h + dcmsr/libcmr/tid1600.cc + dcmsr/libsrc/dsrdocst.cc + dcmsr/tests/tsrcmr.cc + +**** Changes from 2017.09.26 (riesmeier) + +- Updated Context Group classes for DICOM 2017d: + Updated automatically generated Context Group classes for the 2017d edition + of the DICOM standard. There were only changes to CID 4031, 7181 and 7469. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h + dcmsr/libcmr/cid4031.cc + dcmsr/libcmr/cid7181.cc + dcmsr/libcmr/cid7469.cc + +- Updated code definitions for DICOM 2017d: + Updated automatically generated code definitions for coding scheme "DCM", + "NCIt" and "UMLS" for the 2017d edition of the DICOM standard. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h + dcmsr/include/dcmtk/dcmsr/codes/ncit.h + dcmsr/include/dcmtk/dcmsr/codes/umls.h + +- Updated data dictionary for DICOM 2017d: + Updated data dictionary for the latest edition of the DICOM standard, which + has been released only recently. Pleae note that the name of some attributes + changed due to their retirement. + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + dcmrt/libsrc/drtbvcps.cc + +**** Changes from 2017.09.14 (riesmeier) + +- Slightly revised data dictionary documentation: + Slightly revised documentation on the use and configuration of the data + dictionary within the DCMTK. This includes fixing typos and other minor + issues but also some outdated descriptions, which might cause confusion. + Affects: dcmdata/docs/datadict.txt + +**** Changes from 2017.09.13 (riesmeier) + +- Fixed typo in API documentation (Doxygen). + Affects: dcmsr/include/dcmtk/dcmsr/dsrdnflt.h + +**** Changes from 2017.09.12 (riesmeier) + +- Added another gotoNode() method to tree/cursor: + Added another gotoNode() method to tree and cursor class, which searches for + a particular tree node by its value. Also added a new test case for testing + this method. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/dsritcsr.h + dcmsr/include/dcmtk/dcmsr/dsrtncsr.h + dcmsr/include/dcmtk/dcmsr/dsrtree.h + dcmsr/tests/tests.cc + dcmsr/tests/tsrdoctr.cc + +- Added comparison operators to various SR classes: + Added "equal" and "not equal" comparison operators to all document tree node + and underlying value classes as well as to the wrapper class for "SR content + items". These operators will be needed for an upcoming enhancement of the + TID1600_ImageLibrary class, which is part of the "content mapping resource" + sub-module "dcmsr/cmr". + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/dsrcitem.h + dcmsr/include/dcmtk/dcmsr/dsrcodtn.h + dcmsr/include/dcmtk/dcmsr/dsrcodvl.h + dcmsr/include/dcmtk/dcmsr/dsrcomtn.h + dcmsr/include/dcmtk/dcmsr/dsrcomvl.h + dcmsr/include/dcmtk/dcmsr/dsrcontn.h + dcmsr/include/dcmtk/dcmsr/dsrdattn.h + dcmsr/include/dcmtk/dcmsr/dsrdoctn.h + dcmsr/include/dcmtk/dcmsr/dsrdtitn.h + dcmsr/include/dcmtk/dcmsr/dsrimgtn.h + dcmsr/include/dcmtk/dcmsr/dsrimgvl.h + dcmsr/include/dcmtk/dcmsr/dsrnumtn.h + dcmsr/include/dcmtk/dcmsr/dsrnumvl.h + dcmsr/include/dcmtk/dcmsr/dsrpnmtn.h + dcmsr/include/dcmtk/dcmsr/dsrscotn.h + dcmsr/include/dcmtk/dcmsr/dsrscovl.h + dcmsr/include/dcmtk/dcmsr/dsrstrvl.h + dcmsr/include/dcmtk/dcmsr/dsrtcotn.h + dcmsr/include/dcmtk/dcmsr/dsrtcovl.h + dcmsr/include/dcmtk/dcmsr/dsrtextn.h + dcmsr/include/dcmtk/dcmsr/dsrtimtn.h + dcmsr/include/dcmtk/dcmsr/dsrtlist.h + dcmsr/include/dcmtk/dcmsr/dsrtnant.h + dcmsr/include/dcmtk/dcmsr/dsruidtn.h + dcmsr/include/dcmtk/dcmsr/dsrwavtn.h + dcmsr/include/dcmtk/dcmsr/dsrwavvl.h + dcmsr/libsrc/dsrcitem.cc + dcmsr/libsrc/dsrcodtn.cc + dcmsr/libsrc/dsrcodvl.cc + dcmsr/libsrc/dsrcomtn.cc + dcmsr/libsrc/dsrcomvl.cc + dcmsr/libsrc/dsrcontn.cc + dcmsr/libsrc/dsrdattn.cc + dcmsr/libsrc/dsrdoctn.cc + dcmsr/libsrc/dsrdtitn.cc + dcmsr/libsrc/dsrimgtn.cc + dcmsr/libsrc/dsrimgvl.cc + dcmsr/libsrc/dsrnumtn.cc + dcmsr/libsrc/dsrnumvl.cc + dcmsr/libsrc/dsrpnmtn.cc + dcmsr/libsrc/dsrscotn.cc + dcmsr/libsrc/dsrscovl.cc + dcmsr/libsrc/dsrstrvl.cc + dcmsr/libsrc/dsrtcotn.cc + dcmsr/libsrc/dsrtcovl.cc + dcmsr/libsrc/dsrtextn.cc + dcmsr/libsrc/dsrtimtn.cc + dcmsr/libsrc/dsruidtn.cc + dcmsr/libsrc/dsrwavtn.cc + dcmsr/libsrc/dsrwavvl.cc + dcmsr/tests/Makefile.dep + dcmsr/tests/tests.cc + dcmsr/tests/tsrdoctr.cc + +**** Changes from 2017.09.08 (riesmeier) + +- Added support for Protocol Approval SOP Classes: + Added minimal support for the Protocol Approval Storage and Query/Retrieve + SOP Classes, which were introduced with Supplement 192. That means, the UID + definitions are now available to both users of the various network tools and + programmers (using DCMTK's API). + This closes DCMTK Conformance #773. + Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h + dcmdata/libsrc/dcuid.cc + dcmnet/etc/storescp.cfg + dcmnet/etc/storescu.cfg + dcmqrdb/etc/dcmqrprf.cfg + +**** Changes from 2017.09.07 (riesmeier) + +- Removed "virtual" from gotoNode() methods: + Removed virtual function specifier from gotoNode() methods in order to avoid + compiler warnings, e.g. reported by gcc with -Woverloaded-virtual or SunPro + Studio. + Affects: dcmsr/include/dcmtk/dcmsr/dsrtncsr.h + +**** Changes from 2017.09.01 (riesmeier) + +- Added missing DLL specifier to new classes: + The "export macro" is needed on some platforms when building with shared + library support enabled. + Affects: dcmsr/include/dcmtk/dcmsr/dsrdncsr.h + dcmsr/include/dcmtk/dcmsr/dsrdnflt.h + dcmsr/include/dcmtk/dcmsr/dsritcsr.h + +**** Changes from 2017.08.31 (riesmeier) + +- Further enhanced iterating an SR document tree: + Further enhanced iterating an SR document tree. First of all, the tree node + cursor classes DSRDocumentTreeNodeCursor and DSRIncludedTemplateNodeCursor + are now derived explicitly from the template base class in order to allow + extending their capabilities more individually. Then, a new filter mechanism + has been introduced that allows for matching document tree nodes based on a + variety of properties like value type and concept name. These filters can + even be combined using boolean operators like AND and OR. Finally, added + new methods getCursorToCurrentNode() and getCursorToSubTree() to the base + class for SR document trees (DSRDocumentSubTree). + Acknowledgement: This work has been supported in part by the "QIICR" project. + Added: dcmsr/include/dcmtk/dcmsr/dsrdnflt.h + dcmsr/include/dcmtk/dcmsr/dsritcsr.h + dcmsr/libsrc/dsrdnflt.cc + dcmsr/libsrc/dsritcsr.cc + Affects: dcmsr/apps/Makefile.dep + dcmsr/include/dcmtk/dcmsr/dsrdncsr.h + dcmsr/include/dcmtk/dcmsr/dsrdocst.h + dcmsr/include/dcmtk/dcmsr/dsrdoctn.h + dcmsr/include/dcmtk/dcmsr/dsrstpl.h + dcmsr/include/dcmtk/dcmsr/dsrtncsr.h + dcmsr/libcmr/Makefile.dep + dcmsr/libsrc/CMakeLists.txt + dcmsr/libsrc/Makefile.dep + dcmsr/libsrc/Makefile.in + dcmsr/libsrc/dsrdncsr.cc + dcmsr/libsrc/dsrdocst.cc + dcmsr/tests/Makefile.dep + dcmsr/tests/tests.cc + dcmsr/tests/tsrdoctr.cc + +**** Changes from 2017.08.25 (onken) + +- Fixed CMake tests for isnan() and isinf(): + Fixed CMake tests for isnan() and isinf() that have been failing on some + systems if C++11 was enabled for the build. + Thanks to Max Smolens (github user msmolens) for the report and patch. + Affects: CMake/GenerateDCMTKConfigure.cmake + +- Fixed bug when importing Series and Frame of Ref: + Fixed bug when importing Series and Frame of Reference, caused by a + wrong "forwarding" import() call that used the parameters in the wrong + order. This behaviour was hidden by another issue where the same + parameters have been switched around (compared to the header) in the + calling method's parameter list. When the latter issue was fixed + earlier (see commit a9b866) the former issue got revealed, leading to + problems when both parameters (readSeries and readFoR) were called with + different values. + This commit fixes the order in the import() call, and makes the + parameter order in all import() methods consistent. + CAUTION: In order to make the user aware of the critical parameter order + change, the name of the import() method is now importHierarchy() and a + prominent note was added that the orders of parmeters is incompatible + to the old one. + Affects: dcmiod/include/dcmtk/dcmiod/iodcommn.h + dcmiod/libsrc/iodcommn.cc + dcmpmap/include/dcmtk/dcmpmap/dpmparametricmapiod.h + dcmtract/include/dcmtk/dcmtract/trctractographyresults.h + dcmtract/libsrc/trctractographyresults.cc + +- Removed deprecated import method. + Affects: dcmiod/include/dcmtk/dcmiod/iodcommn.h + dcmiod/libsrc/iodcommn.cc + +- Fixed illegal read and memory leak: + Thanks to GwanYeong Kim for the bug report. + Affects: dcmdata/libi2d/i2djpgs.cc + +**** Changes from 2017.08.23 (riesmeier) + +- Added check for invalid parameter combinations: + Added check for invalid parameter combinations when calling addImageEntry() + or addImageGroupDescriptors(), which results in more appropriate error codes. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h + dcmsr/libcmr/tid1600.cc + dcmsr/tests/tsrcmr.cc + +**** Changes from 2017.08.22 (riesmeier) + +- Renamed method addImageEntryDescriptors(): + Renamed method addImageEntryDescriptors() in class TID1600_ImageLibrary to + addImageGroupDescriptors(), which is more descriptive, i.e. better explains + what this method does. Also renamed an error condition constant in order to + be consistent with the new name. Renaming should be OK since this class is + still pretty new and has probably a limited number of users (outside QIICR). + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h + dcmsr/libcmr/tid1600.cc + dcmsr/tests/tsrcmr.cc + +- Enhanced support for descriptors (TID 1600): + Enhanced support for image entry descriptors by adding two new "modes": one + allows for adding selected descriptors only (from a given list) and the other + allows for adding all but the selected descriptors (also from a given list). + These two new modes enable the user of class TID1600_ImageLibrary to decide + which descriptors are added on group level and which ones on image level. + See test case "dcmsr_TID1600_ImageLibrary" for an example on how to use it. + Also removed the not very intuitive default values for the "mode" parameter + from addImageEntry() and addImageEntryDescriptors(), i.e. now the "add mode" + always has to be specified explicitly. Your compiler will tell you about this + change. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h + dcmsr/libcmr/tid1600.cc + dcmsr/tests/tsrcmr.cc + +**** Changes from 2017.08.09 (riesmeier) + +- Add extra content items to extensible templates: + Added new method that allows for adding extra content items to extensible + SR templates. Also added new test case and enhanced existing ones to verify + that it works as expected. + Renamed existing method insertTemplate() to insertExtraTemplate() in order + to be consistent with the new method addExtraContentItem(). This method was + only used in two test cases so far. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/dsrdocst.h + dcmsr/include/dcmtk/dcmsr/dsrrtpl.h + dcmsr/include/dcmtk/dcmsr/dsrstpl.h + dcmsr/libsrc/dsrrtpl.cc + dcmsr/libsrc/dsrstpl.cc + dcmsr/tests/tests.cc + dcmsr/tests/tsrcmr.cc + dcmsr/tests/tsrtpl.cc + +**** Changes from 2017.08.08 (riesmeier) + +- Added mode for order of content items significant: + Added new mode to base class of all SR Templates specifying whether the order + of content items is significant or not. This mode is set by all classes that + are currently implemented from the DICOM Content Mapping Resource (DCMR). + However, this mode is not yet checked since the implemented classes handle + the order significance internally. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/dsrctpl.h + dcmsr/libcmr/tid1001.cc + dcmsr/libcmr/tid1204.cc + dcmsr/libcmr/tid1411.cc + dcmsr/libcmr/tid1419m.cc + dcmsr/libcmr/tid1500.cc + dcmsr/libcmr/tid1501.cc + dcmsr/libcmr/tid1600.cc + dcmsr/libcmr/tid300.cc + dcmsr/libsrc/dsrctpl.cc + dcmsr/tests/tsrtpl.cc + +- Added support for TID 1501 and 300 (Measurement): + Added new classes for TID 1501 (Measurement Group) and TID 300 (Measurement), + and integrated support for them into the existing class for TID 1500 + (Measurement Report). Also added new test case and enhanced existing ones. + Updated Makefile dependencies (after new source/header files have been added). + Acknowledgement: This work has been supported in part by the "QIICR" project. + Added: dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h + dcmsr/include/dcmtk/dcmsr/cmr/tid300.h + dcmsr/libcmr/tid1501.cc + dcmsr/libcmr/tid300.cc + Affects: dcmsr/docs/dcmsr.dox + dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h + dcmsr/libcmr/CMakeLists.txt + dcmsr/libcmr/Makefile.dep + dcmsr/libcmr/Makefile.in + dcmsr/libcmr/tid1500.cc + dcmsr/tests/Makefile.dep + dcmsr/tests/tests.cc + dcmsr/tests/tsrcmr.cc + +**** Changes from 2017.08.07 (riesmeier) + +- Use constant/macro for number of list entries. + Affects: dcmsr/libcmr/tid1500.cc + dcmsr/libcmr/tid1600.cc + +- Added missing "check" parameter: + Added missing "check" parameter to constructors and methods. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h + dcmsr/libcmr/tid1500.cc + +- Created new class for TID 1419 (Measurement): + Created new class for TID 1419 ("Measurement" content item and its children) + by extracting the previously built-in support from the class for TID 1411. + This allows for supporting more content items from TID 1419, e.g. the + "Modifier" and the "Derivation Parameter". Also added support for the + "Qualitative Evaluations" contents items to TID 1411, and added new test + case for the new class. + Please note that the API for adding Measurements to TID 1411 changed + regarding the optional parameters "method" and "derivation". + Acknowledgement: This work has been supported in part by the "QIICR" project. + Added: dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h + dcmsr/libcmr/tid1419m.cc + Affects: dcmsr/docs/dcmsr.dox + dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h + dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h + dcmsr/include/dcmtk/dcmsr/cmr/tid15def.h + dcmsr/libcmr/CMakeLists.txt + dcmsr/libcmr/Makefile.in + dcmsr/libcmr/tid1411.cc + dcmsr/libcmr/tid15def.cc + dcmsr/tests/tests.cc + dcmsr/tests/tsrcmr.cc + +**** Changes from 2017.08.06 (eichelberg) + +- Now generating preformatted man pages as pure ASCII. + Affects: doxygen/man2text.sh + +**** Changes from 2017.08.04 (eichelberg) + +- Enforcing max line width in preformatted man pages: + Now enforcing 80 characters per line maximum when generating man pages in + pre-formatted text format. + Affects: doxygen/man2text.sh + +**** Changes from 2017.07.31 (riesmeier) + +- Factored out error conditions for TID 14xx/15xx: + Factored out common error conditions from TID 14xx and 15xx into a new header + and source file. This change will e.g. be needed for supporting TID 1501 (and + included templates such as TID 300). + Acknowledgement: This work has been supported in part by the "QIICR" project. + Added: dcmsr/include/dcmtk/dcmsr/cmr/tid15def.h + dcmsr/libcmr/tid15def.cc + Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h + dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h + dcmsr/libcmr/CMakeLists.txt + dcmsr/libcmr/Makefile.dep + dcmsr/libcmr/Makefile.in + dcmsr/libcmr/tid1411.cc + dcmsr/libcmr/tid1500.cc + +- Added two SRT codes needed for TID 1501 and 300: + Added two SRT codes (for "Laterality" and "Topographical modifier") that are + needed for the upcoming support of the SR Templates TID 1501 and 300. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/codes/srt.h + +- Added full support for Patient Radiation Dose SR: + Added constraint checker for the Patient Radiation Dose SR IOD (introduced + with Supplement 191). Now, support for this IOD is complete with regards to + the implementation in the "dcmsr" module. + This closes DCMTK Conformance #747. + Added: dcmsr/include/dcmtk/dcmsr/dsrprdcc.h + dcmsr/libsrc/dsrprdcc.cc + Affects: dcmsr/libsrc/CMakeLists.txt + dcmsr/libsrc/Makefile.dep + dcmsr/libsrc/Makefile.in + dcmsr/libsrc/dsrtypes.cc + +- Fixed typo in comment. + Affects: dcmimgle/libsrc/diovlay.cc + +**** Changes from 2017.07.23 (eichelberg) + +- Fixed infinite loop of dcmdata unit test on NetBSD: + Fixed an infinite loop of the dcmdata_partialElementAccess + unit test on NetBSD that was caused by the low quality (randomness) + of the random numbers generated by the rand() function on NetBSD. + This closes DCMTK bug #782. + Affects: dcmdata/tests/tpread.cc + +**** Changes from 2017.07.20 (schlamelcher) + +- Fixed test 'ofstd_limits' failing when using Clang: + Modified the unit test to prevent Clang from optimizing out the overflow from + the overflow test which let the test fail. + Affects: ofstd/tests/tlimits.cc + +**** Changes from 2017.07.19 (riesmeier) + +- Added support for multiple finding sites (DCMSR): + Added support for multiple finding sites in TID 1411 (Row 2) as introduced + with CP-1591 (Allow multiple finding sites for single regions of interest + in measurement templates and segmentations). + Please note that this commit also changes the name of the corresponding + method in class TID1411_VolumetricROIMeasurements from setFindingSite() to + addFindingSite(). This name change makes sure that the user of this class + is warned (if he/she called the "old" method in his source code). + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h + dcmsr/libcmr/tid1411.cc + dcmsr/tests/tsrcmr.cc + +**** Changes from 2017.07.17 (riesmeier) + +- Moved ANNOUNCE file to "docs" subfolder: + Moved official ANNOUNCE file of the DCMTK release 3.6.2 to the "docs" + subfolder and replaced the main ANNOUNCE file with a "dummy". Also fixed + a non-ASCII character in the (new) ANNOUNCE.362 file. + Added: docs/ANNOUNCE.362 + Affects: ANNOUNCE + +- Updated Context Group classes for DICOM 2017c: + Updated automatically generated Context Group classes for the 2017c edition + of the DICOM standard. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/cid100.h + dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h + dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h + dcmsr/include/dcmtk/dcmsr/cmr/cid11.h + dcmsr/include/dcmtk/dcmsr/cmr/cid244.h + dcmsr/include/dcmtk/dcmsr/cmr/cid29.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h + dcmsr/include/dcmtk/dcmsr/cmr/cid42.h + dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h + dcmsr/libcmr/cid100.cc + dcmsr/libcmr/cid10013.cc + dcmsr/libcmr/cid10033.cc + dcmsr/libcmr/cid11.cc + dcmsr/libcmr/cid244.cc + dcmsr/libcmr/cid29.cc + dcmsr/libcmr/cid4020.cc + dcmsr/libcmr/cid4021.cc + dcmsr/libcmr/cid4031.cc + dcmsr/libcmr/cid42.cc + dcmsr/libcmr/cid6147.cc + dcmsr/libcmr/cid7021.cc + dcmsr/libcmr/cid7181.cc + dcmsr/libcmr/cid7445.cc + dcmsr/libcmr/cid7452.cc + dcmsr/libcmr/cid7453.cc + dcmsr/libcmr/cid7464.cc + dcmsr/libcmr/cid7469.cc + +- Updated code definitions for DICOM 2017c: + Updated automatically generated code definitions for coding scheme "DCM", + "NCIt" and "UMLS" for the 2017c edition of the DICOM standard. + Acknowledgement: This work has been supported in part by the "QIICR" project. + Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h + dcmsr/include/dcmtk/dcmsr/codes/ncit.h + dcmsr/include/dcmtk/dcmsr/codes/umls.h + +- Added comment on new optional attribute: + Added comment on Coding Scheme Resources Sequence (0008,0109), an optional + attribute within the Coding Scheme Identification Sequence that has been + introduced only recently with CP-1603 (Enhance Coding Schemes Table). + Affects: dcmsr/include/dcmtk/dcmsr/dsrcsidl.h + +- Updated data dictionary for DICOM 2017c: + Updated data dictionary for the latest edition of the DICOM standard, which + has been released only recently. + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + +- Fixed issue with min/max() macros (Visual Studio): + Fixed another issue with min()/max() macros when integrating the DCMTK, + which was compiled with STL enabled, into another program and NOMINMAX + not being defined. This only seems to apply to Visual Studio compilers. + The original commit that should have fixed this already was 6fb421c. + Affects: ofstd/include/dcmtk/ofstd/oflimits.h + +**** Changes from 2017.07.17 (schlamelcher) + +- Updated version information for 3.6.2+ development: + Updated version information marking the start of DCMTK development post + release 3.6.2. + Affects: CMake/dcmtkPrepare.cmake + VERSION + config/configure + config/configure.in diff --git a/doxygen/CMakeLists.txt b/doxygen/CMakeLists.txt index 68ab2597..0f53cf1c 100644 --- a/doxygen/CMakeLists.txt +++ b/doxygen/CMakeLists.txt @@ -40,9 +40,9 @@ IF(DCMTK_WITH_DOXYGEN) ENDIF(NOT WIN32) # install html docs and manpages - INSTALL(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/htmldocs/" DESTINATION "${DCMTK_INSTALL_HTMDIR}" COMPONENT html PATTERN "*.md5" EXCLUDE) + INSTALL(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/htmldocs/" DESTINATION "${CMAKE_INSTALL_DOCDIR}/html" COMPONENT html PATTERN "*.md5" EXCLUDE) IF(DCMTK_GENERATE_DOXYGEN_TAGFILE) - INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${DOXYGEN_TAGFILE}" DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT html OPTIONAL) + INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${DOXYGEN_TAGFILE}" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT html OPTIONAL) ENDIF(DCMTK_GENERATE_DOXYGEN_TAGFILE) IF(NOT WIN32) FILE(GLOB_RECURSE MANPAGES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/manpages/" "${CMAKE_CURRENT_SOURCE_DIR}/manpages/*.1") @@ -52,7 +52,7 @@ IF(DCMTK_WITH_DOXYGEN) FILE(COPY "${CMAKE_CURRENT_SOURCE_DIR}/manpages/${MANPAGE}" DESTINATION "${DESTINATION}") ENDIF() ENDFOREACH() - INSTALL(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/manpages/" DESTINATION "${DCMTK_INSTALL_MANDIR}" COMPONENT man PATTERN "*_.1" EXCLUDE) + INSTALL(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/manpages/" DESTINATION "${CMAKE_INSTALL_MANDIR}" COMPONENT man PATTERN "*_.1" EXCLUDE) ENDIF(NOT WIN32) # the files in manpages/ and htmldocs/ should be removed by "make clean". @@ -67,7 +67,7 @@ ELSE(DCMTK_WITH_DOXYGEN) # by default, install the pre-defined manpages, i.e. the ones shipped with this package IF(NOT WIN32) - INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/manpages/" DESTINATION "${DCMTK_INSTALL_MANDIR}" COMPONENT man) + INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/manpages/" DESTINATION "${CMAKE_INSTALL_MANDIR}" COMPONENT man) ENDIF(NOT WIN32) ENDIF(DCMTK_WITH_DOXYGEN) diff --git a/doxygen/man2text.sh b/doxygen/man2text.sh index 33e7b756..d5154708 100755 --- a/doxygen/man2text.sh +++ b/doxygen/man2text.sh @@ -3,5 +3,5 @@ # Generate a text representation of the man pages cd manpages/man1/ for file in *.1 ; do \ - man -l $file | col -bxp > ../../man2text/`echo $file | sed 's/\(.*\.\)1/\1txt/'` ;\ + MANWIDTH=80 man -E ascii -l $file | col -bxp > ../../man2text/`echo $file | sed 's/\(.*\.\)1/\1txt/'` ;\ done diff --git a/doxygen/manpages/man1/dcm2json.1 b/doxygen/manpages/man1/dcm2json.1 index c27e8b63..83789c75 100644 --- a/doxygen/manpages/man1/dcm2json.1 +++ b/doxygen/manpages/man1/dcm2json.1 @@ -1,4 +1,4 @@ -.TH "dcm2json" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcm2json" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcm2json \- Convert DICOM file and data set to JSON diff --git a/doxygen/manpages/man1/dcm2pdf.1 b/doxygen/manpages/man1/dcm2pdf.1 index 9fdb851e..f3b3e910 100644 --- a/doxygen/manpages/man1/dcm2pdf.1 +++ b/doxygen/manpages/man1/dcm2pdf.1 @@ -1,4 +1,4 @@ -.TH "dcm2pdf" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcm2pdf" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcm2pdf \- Extract PDF file from DICOM encapsulated PDF diff --git a/doxygen/manpages/man1/dcm2pnm.1 b/doxygen/manpages/man1/dcm2pnm.1 index 90b66dc4..e8580f39 100644 --- a/doxygen/manpages/man1/dcm2pnm.1 +++ b/doxygen/manpages/man1/dcm2pnm.1 @@ -1,4 +1,4 @@ -.TH "dcm2pnm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcm2pnm" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcm2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF or BMP diff --git a/doxygen/manpages/man1/dcm2xml.1 b/doxygen/manpages/man1/dcm2xml.1 index 49435469..06c78b6d 100644 --- a/doxygen/manpages/man1/dcm2xml.1 +++ b/doxygen/manpages/man1/dcm2xml.1 @@ -1,4 +1,4 @@ -.TH "dcm2xml" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcm2xml" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcm2xml \- Convert DICOM file and data set to XML diff --git a/doxygen/manpages/man1/dcmcjpeg.1 b/doxygen/manpages/man1/dcmcjpeg.1 index fee8c961..b82bb6d8 100644 --- a/doxygen/manpages/man1/dcmcjpeg.1 +++ b/doxygen/manpages/man1/dcmcjpeg.1 @@ -1,4 +1,4 @@ -.TH "dcmcjpeg" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmcjpeg" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmcjpeg \- Encode DICOM file to JPEG transfer syntax diff --git a/doxygen/manpages/man1/dcmcjpls.1 b/doxygen/manpages/man1/dcmcjpls.1 index fe887f9d..099d4673 100644 --- a/doxygen/manpages/man1/dcmcjpls.1 +++ b/doxygen/manpages/man1/dcmcjpls.1 @@ -1,4 +1,4 @@ -.TH "dcmcjpls" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmcjpls" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmcjpls \- Encode DICOM file to JPEG-LS transfer syntax diff --git a/doxygen/manpages/man1/dcmconv.1 b/doxygen/manpages/man1/dcmconv.1 index ee3df0c6..bccd11a5 100644 --- a/doxygen/manpages/man1/dcmconv.1 +++ b/doxygen/manpages/man1/dcmconv.1 @@ -1,4 +1,4 @@ -.TH "dcmconv" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmconv" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmconv \- Convert DICOM file encoding diff --git a/doxygen/manpages/man1/dcmcrle.1 b/doxygen/manpages/man1/dcmcrle.1 index e432d92f..dbb454a7 100644 --- a/doxygen/manpages/man1/dcmcrle.1 +++ b/doxygen/manpages/man1/dcmcrle.1 @@ -1,4 +1,4 @@ -.TH "dcmcrle" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmcrle" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmcrle \- Encode DICOM file to RLE transfer syntax diff --git a/doxygen/manpages/man1/dcmdjpeg.1 b/doxygen/manpages/man1/dcmdjpeg.1 index 001c8ade..d3c6c22e 100644 --- a/doxygen/manpages/man1/dcmdjpeg.1 +++ b/doxygen/manpages/man1/dcmdjpeg.1 @@ -1,4 +1,4 @@ -.TH "dcmdjpeg" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdjpeg" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdjpeg \- Decode JPEG-compressed DICOM file diff --git a/doxygen/manpages/man1/dcmdjpls.1 b/doxygen/manpages/man1/dcmdjpls.1 index 245cced8..e5d83168 100644 --- a/doxygen/manpages/man1/dcmdjpls.1 +++ b/doxygen/manpages/man1/dcmdjpls.1 @@ -1,4 +1,4 @@ -.TH "dcmdjpls" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdjpls" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdjpls \- Decode JPEG-LS compressed DICOM file diff --git a/doxygen/manpages/man1/dcmdrle.1 b/doxygen/manpages/man1/dcmdrle.1 index ec823501..e569d24d 100644 --- a/doxygen/manpages/man1/dcmdrle.1 +++ b/doxygen/manpages/man1/dcmdrle.1 @@ -1,4 +1,4 @@ -.TH "dcmdrle" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdrle" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdrle \- Decode RLE-compressed DICOM file diff --git a/doxygen/manpages/man1/dcmdspfn.1 b/doxygen/manpages/man1/dcmdspfn.1 index 36a7030e..3815358b 100644 --- a/doxygen/manpages/man1/dcmdspfn.1 +++ b/doxygen/manpages/man1/dcmdspfn.1 @@ -1,4 +1,4 @@ -.TH "dcmdspfn" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdspfn" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdspfn \- Export standard display curves to a text file diff --git a/doxygen/manpages/man1/dcmdump.1 b/doxygen/manpages/man1/dcmdump.1 index 34aefc17..f05ec7e9 100644 --- a/doxygen/manpages/man1/dcmdump.1 +++ b/doxygen/manpages/man1/dcmdump.1 @@ -1,4 +1,4 @@ -.TH "dcmdump" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdump" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdump \- Dump DICOM file and data set diff --git a/doxygen/manpages/man1/dcmftest.1 b/doxygen/manpages/man1/dcmftest.1 index 2586fd94..c6cb8c0e 100644 --- a/doxygen/manpages/man1/dcmftest.1 +++ b/doxygen/manpages/man1/dcmftest.1 @@ -1,4 +1,4 @@ -.TH "dcmftest" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmftest" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmftest \- Test if file uses DICOM part 10 format diff --git a/doxygen/manpages/man1/dcmgpdir.1 b/doxygen/manpages/man1/dcmgpdir.1 index 35ed52ae..c21001bc 100644 --- a/doxygen/manpages/man1/dcmgpdir.1 +++ b/doxygen/manpages/man1/dcmgpdir.1 @@ -1,4 +1,4 @@ -.TH "dcmgpdir" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmgpdir" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmgpdir \- Create a general purpose DICOMDIR diff --git a/doxygen/manpages/man1/dcmj2pnm.1 b/doxygen/manpages/man1/dcmj2pnm.1 index de167d1a..cd5fd372 100644 --- a/doxygen/manpages/man1/dcmj2pnm.1 +++ b/doxygen/manpages/man1/dcmj2pnm.1 @@ -1,4 +1,4 @@ -.TH "dcmj2pnm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmj2pnm" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmj2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP diff --git a/doxygen/manpages/man1/dcml2pnm.1 b/doxygen/manpages/man1/dcml2pnm.1 index 24df0be5..890309ab 100644 --- a/doxygen/manpages/man1/dcml2pnm.1 +++ b/doxygen/manpages/man1/dcml2pnm.1 @@ -1,4 +1,4 @@ -.TH "dcml2pnm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcml2pnm" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcml2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF or BMP diff --git a/doxygen/manpages/man1/dcmmkcrv.1 b/doxygen/manpages/man1/dcmmkcrv.1 index a158e7a9..692fb1ab 100644 --- a/doxygen/manpages/man1/dcmmkcrv.1 +++ b/doxygen/manpages/man1/dcmmkcrv.1 @@ -1,4 +1,4 @@ -.TH "dcmmkcrv" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmmkcrv" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmmkcrv \- Add 2D curve data to image diff --git a/doxygen/manpages/man1/dcmmkdir.1 b/doxygen/manpages/man1/dcmmkdir.1 index f74b3523..d24f5eba 100644 --- a/doxygen/manpages/man1/dcmmkdir.1 +++ b/doxygen/manpages/man1/dcmmkdir.1 @@ -1,4 +1,4 @@ -.TH "dcmmkdir" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmmkdir" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmmkdir \- Create a DICOMDIR file diff --git a/doxygen/manpages/man1/dcmmklut.1 b/doxygen/manpages/man1/dcmmklut.1 index f9c53fab..b166598e 100644 --- a/doxygen/manpages/man1/dcmmklut.1 +++ b/doxygen/manpages/man1/dcmmklut.1 @@ -1,4 +1,4 @@ -.TH "dcmmklut" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmmklut" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmmklut \- Create DICOM look-up tables diff --git a/doxygen/manpages/man1/dcmodify.1 b/doxygen/manpages/man1/dcmodify.1 index fc1bcbdd..e417cf8a 100644 --- a/doxygen/manpages/man1/dcmodify.1 +++ b/doxygen/manpages/man1/dcmodify.1 @@ -1,4 +1,4 @@ -.TH "dcmodify" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmodify" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmodify \- Modify DICOM files diff --git a/doxygen/manpages/man1/dcmp2pgm.1 b/doxygen/manpages/man1/dcmp2pgm.1 index e11abb2d..e32e2dac 100644 --- a/doxygen/manpages/man1/dcmp2pgm.1 +++ b/doxygen/manpages/man1/dcmp2pgm.1 @@ -1,4 +1,4 @@ -.TH "dcmp2pgm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmp2pgm" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmp2pgm \- Read DICOM image and presentation state and render bitmap diff --git a/doxygen/manpages/man1/dcmprscp.1 b/doxygen/manpages/man1/dcmprscp.1 index ded73b9b..69a259e0 100644 --- a/doxygen/manpages/man1/dcmprscp.1 +++ b/doxygen/manpages/man1/dcmprscp.1 @@ -1,4 +1,4 @@ -.TH "dcmprscp" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmprscp" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmprscp \- DICOM basic grayscale print management SCP diff --git a/doxygen/manpages/man1/dcmprscu.1 b/doxygen/manpages/man1/dcmprscu.1 index dff4f914..324ee53f 100644 --- a/doxygen/manpages/man1/dcmprscu.1 +++ b/doxygen/manpages/man1/dcmprscu.1 @@ -1,4 +1,4 @@ -.TH "dcmprscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmprscu" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmprscu \- Print spooler for presentation state viewer diff --git a/doxygen/manpages/man1/dcmpschk.1 b/doxygen/manpages/man1/dcmpschk.1 index b74c2f65..f5637cf1 100644 --- a/doxygen/manpages/man1/dcmpschk.1 +++ b/doxygen/manpages/man1/dcmpschk.1 @@ -1,4 +1,4 @@ -.TH "dcmpschk" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpschk" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpschk \- Checking tool for presentation states diff --git a/doxygen/manpages/man1/dcmpsmk.1 b/doxygen/manpages/man1/dcmpsmk.1 index d6107324..f8fa8230 100644 --- a/doxygen/manpages/man1/dcmpsmk.1 +++ b/doxygen/manpages/man1/dcmpsmk.1 @@ -1,4 +1,4 @@ -.TH "dcmpsmk" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpsmk" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpsmk \- Create DICOM grayscale softcopy presentation state diff --git a/doxygen/manpages/man1/dcmpsprt.1 b/doxygen/manpages/man1/dcmpsprt.1 index d57cfd0e..04afa84c 100644 --- a/doxygen/manpages/man1/dcmpsprt.1 +++ b/doxygen/manpages/man1/dcmpsprt.1 @@ -1,4 +1,4 @@ -.TH "dcmpsprt" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpsprt" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpsprt \- Read DICOM images and presentation states and render print job diff --git a/doxygen/manpages/man1/dcmpsrcv.1 b/doxygen/manpages/man1/dcmpsrcv.1 index 9ed5605d..7d4f1644 100644 --- a/doxygen/manpages/man1/dcmpsrcv.1 +++ b/doxygen/manpages/man1/dcmpsrcv.1 @@ -1,4 +1,4 @@ -.TH "dcmpsrcv" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpsrcv" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpsrcv \- Network receive for presentation state viewer diff --git a/doxygen/manpages/man1/dcmpssnd.1 b/doxygen/manpages/man1/dcmpssnd.1 index 70a3f0cc..20da3a00 100644 --- a/doxygen/manpages/man1/dcmpssnd.1 +++ b/doxygen/manpages/man1/dcmpssnd.1 @@ -1,4 +1,4 @@ -.TH "dcmpssnd" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpssnd" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpssnd \- Network send for presentation state viewer diff --git a/doxygen/manpages/man1/dcmqridx.1 b/doxygen/manpages/man1/dcmqridx.1 index b1f96b17..c6eb695d 100644 --- a/doxygen/manpages/man1/dcmqridx.1 +++ b/doxygen/manpages/man1/dcmqridx.1 @@ -1,4 +1,4 @@ -.TH "dcmqridx" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmqridx" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmqridx \- Register a DICOM image file in an image database index file diff --git a/doxygen/manpages/man1/dcmqrscp.1 b/doxygen/manpages/man1/dcmqrscp.1 index c5274b5d..3d97e49a 100644 --- a/doxygen/manpages/man1/dcmqrscp.1 +++ b/doxygen/manpages/man1/dcmqrscp.1 @@ -1,4 +1,4 @@ -.TH "dcmqrscp" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmqrscp" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmqrscp \- DICOM image archive (central test node) diff --git a/doxygen/manpages/man1/dcmqrti.1 b/doxygen/manpages/man1/dcmqrti.1 index 57f99a0a..07e45124 100644 --- a/doxygen/manpages/man1/dcmqrti.1 +++ b/doxygen/manpages/man1/dcmqrti.1 @@ -1,4 +1,4 @@ -.TH "dcmqrti" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmqrti" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmqrti \- The Terminal Initiator Telnet Client Program diff --git a/doxygen/manpages/man1/dcmquant.1 b/doxygen/manpages/man1/dcmquant.1 index 306907da..240e86bf 100644 --- a/doxygen/manpages/man1/dcmquant.1 +++ b/doxygen/manpages/man1/dcmquant.1 @@ -1,4 +1,4 @@ -.TH "dcmquant" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmquant" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmquant \- Convert DICOM color images to palette color diff --git a/doxygen/manpages/man1/dcmrecv.1 b/doxygen/manpages/man1/dcmrecv.1 index 64ff5d33..0b0f8f8c 100644 --- a/doxygen/manpages/man1/dcmrecv.1 +++ b/doxygen/manpages/man1/dcmrecv.1 @@ -1,4 +1,4 @@ -.TH "dcmrecv" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmrecv" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmrecv \- Simple DICOM storage SCP (receiver) diff --git a/doxygen/manpages/man1/dcmscale.1 b/doxygen/manpages/man1/dcmscale.1 index f3bb5747..c62b2f63 100644 --- a/doxygen/manpages/man1/dcmscale.1 +++ b/doxygen/manpages/man1/dcmscale.1 @@ -1,4 +1,4 @@ -.TH "dcmscale" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmscale" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmscale \- Scale DICOM images diff --git a/doxygen/manpages/man1/dcmsend.1 b/doxygen/manpages/man1/dcmsend.1 index c35217bd..735f4620 100644 --- a/doxygen/manpages/man1/dcmsend.1 +++ b/doxygen/manpages/man1/dcmsend.1 @@ -1,4 +1,4 @@ -.TH "dcmsend" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmsend" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmsend \- Simple DICOM storage SCU (sender) diff --git a/doxygen/manpages/man1/dcmsign.1 b/doxygen/manpages/man1/dcmsign.1 index f852a76b..a65307a9 100644 --- a/doxygen/manpages/man1/dcmsign.1 +++ b/doxygen/manpages/man1/dcmsign.1 @@ -1,4 +1,4 @@ -.TH "dcmsign" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmsign" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmsign \- Sign and Verify DICOM Files diff --git a/doxygen/manpages/man1/dcod2lum.1 b/doxygen/manpages/man1/dcod2lum.1 index 9aa98f17..8256cc9a 100644 --- a/doxygen/manpages/man1/dcod2lum.1 +++ b/doxygen/manpages/man1/dcod2lum.1 @@ -1,4 +1,4 @@ -.TH "dcod2lum" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcod2lum" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcod2lum \- Convert hardcopy characteristic curve file to softcopy format diff --git a/doxygen/manpages/man1/dconvlum.1 b/doxygen/manpages/man1/dconvlum.1 index 41347b08..becefbb3 100644 --- a/doxygen/manpages/man1/dconvlum.1 +++ b/doxygen/manpages/man1/dconvlum.1 @@ -1,4 +1,4 @@ -.TH "dconvlum" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dconvlum" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dconvlum \- Convert VeriLUM files to DCMTK display files diff --git a/doxygen/manpages/man1/drtdump.1 b/doxygen/manpages/man1/drtdump.1 index ffb1045e..d584fa3d 100644 --- a/doxygen/manpages/man1/drtdump.1 +++ b/doxygen/manpages/man1/drtdump.1 @@ -1,4 +1,4 @@ -.TH "drtdump" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "drtdump" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME drtdump \- Dump DICOM RT file and data set diff --git a/doxygen/manpages/man1/dsr2html.1 b/doxygen/manpages/man1/dsr2html.1 index 084fac81..c298afca 100644 --- a/doxygen/manpages/man1/dsr2html.1 +++ b/doxygen/manpages/man1/dsr2html.1 @@ -1,4 +1,4 @@ -.TH "dsr2html" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dsr2html" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dsr2html \- Render DICOM SR file and data set to HTML/XHTML diff --git a/doxygen/manpages/man1/dsr2xml.1 b/doxygen/manpages/man1/dsr2xml.1 index f47f0fd0..aeeaa03b 100644 --- a/doxygen/manpages/man1/dsr2xml.1 +++ b/doxygen/manpages/man1/dsr2xml.1 @@ -1,4 +1,4 @@ -.TH "dsr2xml" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dsr2xml" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dsr2xml \- Convert DICOM SR file and data set to XML diff --git a/doxygen/manpages/man1/dsrdump.1 b/doxygen/manpages/man1/dsrdump.1 index 381e6a34..bc2298a4 100644 --- a/doxygen/manpages/man1/dsrdump.1 +++ b/doxygen/manpages/man1/dsrdump.1 @@ -1,4 +1,4 @@ -.TH "dsrdump" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dsrdump" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dsrdump \- Dump DICOM SR file and data set diff --git a/doxygen/manpages/man1/dump2dcm.1 b/doxygen/manpages/man1/dump2dcm.1 index 509f6168..f7f76648 100644 --- a/doxygen/manpages/man1/dump2dcm.1 +++ b/doxygen/manpages/man1/dump2dcm.1 @@ -1,4 +1,4 @@ -.TH "dump2dcm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dump2dcm" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dump2dcm \- Convert ASCII dump to DICOM file diff --git a/doxygen/manpages/man1/echoscu.1 b/doxygen/manpages/man1/echoscu.1 index 4cd908df..b07255ac 100644 --- a/doxygen/manpages/man1/echoscu.1 +++ b/doxygen/manpages/man1/echoscu.1 @@ -1,4 +1,4 @@ -.TH "echoscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "echoscu" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME echoscu \- DICOM verification (C-ECHO) SCU @@ -77,6 +77,9 @@ other network options: -to --timeout [s]econds: integer (default: unlimited) timeout for connection requests + -ts --socket-timeout [s]econds: integer (default: 60) + timeout for network socket (0 for none) + -ta --acse-timeout [s]econds: integer (default: 30) timeout for ACSE messages diff --git a/doxygen/manpages/man1/findscu.1 b/doxygen/manpages/man1/findscu.1 index 4e5696f3..3e1e12a0 100644 --- a/doxygen/manpages/man1/findscu.1 +++ b/doxygen/manpages/man1/findscu.1 @@ -1,4 +1,4 @@ -.TH "findscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "findscu" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME findscu \- DICOM query (C-FIND) SCU @@ -240,7 +240,13 @@ C-FIND responses: do not output responses to the logger -X --extract - extract responses to file (rsp0001.dcm, ...) + extract responses to DICOM file (rsp0001.dcm...) + + -Xx --extract-xml + extract responses to XML file (rsp0001.xml...) + + -Xs --extract-xml-single [f]ilename: string + extract all responses to given XML file f .fi .PP .SH "NOTES" @@ -289,7 +295,11 @@ Sequence' and an attribute 'Modality' in the first item of this sequence with va .PP If no file is specified on the command line, the query must be specified completely with one or more \fI-k\fP options\&. If multiple query files are provided, \fBfindscu\fP will send multiple C-FIND requests to the SCP\&. .PP -Each set of response identifiers received will be output to the logger unless option \fI--hide-responses\fP, \fI--extract\fP, \fI--quiet\fP or an appropriate logger configuration is used\&. Option \fI--show-responses\fP can be used to force the output to the logger\&. +Each set of response identifiers received will be output to the logger unless option \fI--hide-responses\fP, any of the below \fI--extract\fP variants, \fI--quiet\fP or an appropriate logger configuration is used\&. In such cases, the output to the logger can be enforced with option \fI--show-responses\fP\&. +.PP +In addition, the response datasets can also be extracted as individual DICOM files (using option \fI--extract\fP) or XML files (using option \fI--extract-xml\fP)\&. The output format of the latter is described by the file \fIdcm2xml\&.dtd\fP (starting with top-level element 'data-set')\&. +.PP +Alternatively, all response datasets of an association can be extracted to a single XML file using option \fI--extract-xml-single\fP\&. The top-level element of the XML document is 'responses' (with a 'type' attribute of 'C-FIND')\&. The individual datasets are stored as described above\&. If support for character set conversion is enabled, UTF-8 encoding is used, i\&.e\&. all datasets are converted to UTF-8 encoding (which is strongly recommended in order to avoid issues with non-ASCII characters when different character sets are used)\&. .SS "DICOM Conformance" The \fBfindscu\fP application supports the following SOP Classes as an SCU: .PP @@ -335,9 +345,12 @@ In addition, one or more command files can be specified using an '@' sign as a p The \fBfindscu\fP utility will attempt to load DICOM data dictionaries specified in the \fIDCMDICTPATH\fP environment variable\&. By default, i\&.e\&. if the \fIDCMDICTPATH\fP environment variable is not set, the file \fI/dicom\&.dic\fP will be loaded unless the dictionary is built into the application (default for Windows)\&. .PP The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&. +.SH "FILES" +.PP +\fI/dcm2xml\&.dtd\fP - Document Type Definition (DTD) file .SH "SEE ALSO" .PP \fBmovescu\fP(1), \fBdump2dcm\fP(1), \fBdcmodify\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1994-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1994-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff --git a/doxygen/manpages/man1/getscu.1 b/doxygen/manpages/man1/getscu.1 index fda71c81..4a290d1b 100644 --- a/doxygen/manpages/man1/getscu.1 +++ b/doxygen/manpages/man1/getscu.1 @@ -1,4 +1,4 @@ -.TH "getscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "getscu" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME getscu \- DICOM retrieve (C-GET) SCU diff --git a/doxygen/manpages/man1/img2dcm.1 b/doxygen/manpages/man1/img2dcm.1 index e11235db..d5014676 100644 --- a/doxygen/manpages/man1/img2dcm.1 +++ b/doxygen/manpages/man1/img2dcm.1 @@ -1,4 +1,4 @@ -.TH "img2dcm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "img2dcm" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME img2dcm \- Convert standard image formats into DICOM format diff --git a/doxygen/manpages/man1/movescu.1 b/doxygen/manpages/man1/movescu.1 index 725860b9..ba937bc5 100644 --- a/doxygen/manpages/man1/movescu.1 +++ b/doxygen/manpages/man1/movescu.1 @@ -1,4 +1,4 @@ -.TH "movescu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "movescu" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME movescu \- DICOM retrieve (C-MOVE) SCU diff --git a/doxygen/manpages/man1/pdf2dcm.1 b/doxygen/manpages/man1/pdf2dcm.1 index ee1297b1..d3bcb931 100644 --- a/doxygen/manpages/man1/pdf2dcm.1 +++ b/doxygen/manpages/man1/pdf2dcm.1 @@ -1,4 +1,4 @@ -.TH "pdf2dcm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "pdf2dcm" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME pdf2dcm \- Convert PDF file to DICOM diff --git a/doxygen/manpages/man1/storescp.1 b/doxygen/manpages/man1/storescp.1 index 7472a186..449d88e9 100644 --- a/doxygen/manpages/man1/storescp.1 +++ b/doxygen/manpages/man1/storescp.1 @@ -1,4 +1,4 @@ -.TH "storescp" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "storescp" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME storescp \- DICOM storage (C-STORE) SCP diff --git a/doxygen/manpages/man1/storescu.1 b/doxygen/manpages/man1/storescu.1 index 5c204ee1..e07c3f49 100644 --- a/doxygen/manpages/man1/storescu.1 +++ b/doxygen/manpages/man1/storescu.1 @@ -1,4 +1,4 @@ -.TH "storescu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "storescu" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME storescu \- DICOM storage (C-STORE) SCU diff --git a/doxygen/manpages/man1/termscu.1 b/doxygen/manpages/man1/termscu.1 index 51acb400..9260fff3 100644 --- a/doxygen/manpages/man1/termscu.1 +++ b/doxygen/manpages/man1/termscu.1 @@ -1,4 +1,4 @@ -.TH "termscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "termscu" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME termscu \- DICOM termination SCU diff --git a/doxygen/manpages/man1/wlmscpfs.1 b/doxygen/manpages/man1/wlmscpfs.1 index 9b620242..b72bf48a 100644 --- a/doxygen/manpages/man1/wlmscpfs.1 +++ b/doxygen/manpages/man1/wlmscpfs.1 @@ -1,4 +1,4 @@ -.TH "wlmscpfs" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "wlmscpfs" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME wlmscpfs \- DICOM Basic Worklist Management SCP (based on data files) diff --git a/doxygen/manpages/man1/xml2dcm.1 b/doxygen/manpages/man1/xml2dcm.1 index 2181a781..6d275735 100644 --- a/doxygen/manpages/man1/xml2dcm.1 +++ b/doxygen/manpages/man1/xml2dcm.1 @@ -1,4 +1,4 @@ -.TH "xml2dcm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "xml2dcm" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME xml2dcm \- Convert XML document to DICOM file or data set diff --git a/doxygen/manpages/man1/xml2dsr.1 b/doxygen/manpages/man1/xml2dsr.1 index ae0ffab3..10cf64aa 100644 --- a/doxygen/manpages/man1/xml2dsr.1 +++ b/doxygen/manpages/man1/xml2dsr.1 @@ -1,4 +1,4 @@ -.TH "xml2dsr" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*- +.TH "xml2dsr" 1 "Mon Feb 5 2018" "Version 3.6.3" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME xml2dsr \- Convert DICOM SR file and data set to XML diff --git a/oflog/etc/CMakeLists.txt b/oflog/etc/CMakeLists.txt index 49b15869..58363192 100644 --- a/oflog/etc/CMakeLists.txt +++ b/oflog/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES logger.cfg filelog.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc) +INSTALL(FILES logger.cfg filelog.cfg DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/dcmtk" COMPONENT etc) diff --git a/oflog/include/CMakeLists.txt b/oflog/include/CMakeLists.txt index 9c492771..b28a84ad 100644 --- a/oflog/include/CMakeLists.txt +++ b/oflog/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/oflog DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/oflog DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/oflog/include/dcmtk/oflog/config/win32.h b/oflog/include/dcmtk/oflog/config/win32.h index 79eb221b..eb8d6e1d 100644 --- a/oflog/include/dcmtk/oflog/config/win32.h +++ b/oflog/include/dcmtk/oflog/config/win32.h @@ -31,7 +31,7 @@ #ifdef _WIN32 /* This used to be _MSC_VER >= 1400, but MSVC 2005 is broken */ -#if (defined (_MSC_VER) && _MSC_VER > 1400) || defined (__MINGW32__) +#if (defined (_MSC_VER) && _MSC_VER > 1400) # define DCMTK_LOG4CPLUS_HAVE_INTRIN_H #endif diff --git a/oflog/libsrc/Makefile.dep b/oflog/libsrc/Makefile.dep index 3e26dba4..3d699344 100644 --- a/oflog/libsrc/Makefile.dep +++ b/oflog/libsrc/Makefile.dep @@ -1188,24 +1188,6 @@ sockbuff.o: sockbuff.cc ../include/dcmtk/oflog/helpers/sockbuff.h \ ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/helpers/loglog.h \ ../include/dcmtk/oflog/streams.h \ ../include/dcmtk/oflog/thread/syncprim.h -socket.o: socket.cc ../include/dcmtk/oflog/helpers/loglog.h \ - ../include/dcmtk/oflog/config.h \ - ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ - ../../ofstd/include/dcmtk/ofstd/ofcast.h \ - ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../include/dcmtk/oflog/config/defines.h \ - ../include/dcmtk/oflog/helpers/threadcf.h \ - ../include/dcmtk/oflog/tstring.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \ - ../include/dcmtk/oflog/thread/syncprim.h \ - ../include/dcmtk/oflog/internal/socket.h \ - ../include/dcmtk/oflog/helpers/socket.h \ - ../include/dcmtk/oflog/helpers/sockbuff.h socketap.o: socketap.cc ../include/dcmtk/oflog/socketap.h \ ../include/dcmtk/oflog/config.h \ ../../config/include/dcmtk/config/osconfig.h \ @@ -1242,6 +1224,24 @@ socketap.o: socketap.cc ../include/dcmtk/oflog/socketap.h \ ../include/dcmtk/oflog/helpers/sleep.h \ ../include/dcmtk/oflog/helpers/property.h \ ../include/dcmtk/oflog/thread/syncpub.h +socket.o: socket.cc ../include/dcmtk/oflog/helpers/loglog.h \ + ../include/dcmtk/oflog/config.h \ + ../../config/include/dcmtk/config/osconfig.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../include/dcmtk/oflog/config/defines.h \ + ../include/dcmtk/oflog/helpers/threadcf.h \ + ../include/dcmtk/oflog/tstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \ + ../include/dcmtk/oflog/thread/syncprim.h \ + ../include/dcmtk/oflog/internal/socket.h \ + ../include/dcmtk/oflog/helpers/socket.h \ + ../include/dcmtk/oflog/helpers/sockbuff.h strccloc.o: strccloc.cc ../include/dcmtk/oflog/helpers/strhelp.h \ ../include/dcmtk/oflog/config.h \ ../../config/include/dcmtk/config/osconfig.h \ diff --git a/oflog/libsrc/Makefile.in b/oflog/libsrc/Makefile.in index 06ee3137..8d175b45 100644 --- a/oflog/libsrc/Makefile.in +++ b/oflog/libsrc/Makefile.in @@ -25,7 +25,7 @@ objs = oflog.o apndimpl.o appender.o config.o consap.o \ syncprims.o syslogap.o threads.o timehelp.o unixsock.o clogger.o \ env.o fileinfo.o lockfile.o mdc.o queue.o snprintf.o tls.o version.o \ log4judp.o logmacro.o asyncap.o cygwin32.o striconv.o \ - strcloc.o strccloc.o + strcloc.o strccloc.o winsock.o ntelogap.o winconap.o windebap.o library = liboflog.$(LIBEXT) diff --git a/oflog/libsrc/tls.cc b/oflog/libsrc/tls.cc index 4c128f3d..6edb80e0 100644 --- a/oflog/libsrc/tls.cc +++ b/oflog/libsrc/tls.cc @@ -35,6 +35,10 @@ namespace log4cplus { namespace thread { namespace impl { //! initialization order fiasco. OFVector * tls_single_threaded_values; +#else + +int tls_cc_dummy_to_keep_linker_from_moaning = 0; + #endif diff --git a/ofstd/include/CMakeLists.txt b/ofstd/include/CMakeLists.txt index 29489e99..5b048834 100644 --- a/ofstd/include/CMakeLists.txt +++ b/ofstd/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/ofstd DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "*.def") +INSTALL(DIRECTORY dcmtk/ofstd DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "*.def") diff --git a/ofstd/include/dcmtk/ofstd/ofgrp.h b/ofstd/include/dcmtk/ofstd/ofgrp.h index c192d3af..275b6df7 100644 --- a/ofstd/include/dcmtk/ofstd/ofgrp.h +++ b/ofstd/include/dcmtk/ofstd/ofgrp.h @@ -34,7 +34,9 @@ BEGIN_EXTERN_C END_EXTERN_C #ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif diff --git a/ofstd/include/dcmtk/ofstd/oflimits.h b/ofstd/include/dcmtk/ofstd/oflimits.h index 5c0b9207..50e5e125 100644 --- a/ofstd/include/dcmtk/ofstd/oflimits.h +++ b/ofstd/include/dcmtk/ofstd/oflimits.h @@ -63,19 +63,19 @@ template struct OFnumeric_limits : std::numeric_limits { static const int max_digits10 = 0; - static inline T lowest() { return std::numeric_limits::min(); } + static inline T lowest() { return (std::numeric_limits::min)(); } }; template<> struct OFnumeric_limits : std::numeric_limits { static const int max_digits10 = DCMTK_FLOAT_MAX_DIGITS10; - static inline float lowest() { return -std::numeric_limits::max(); } + static inline float lowest() { return -(std::numeric_limits::max)(); } }; template<> struct OFnumeric_limits : std::numeric_limits { static const int max_digits10 = DCMTK_DOUBLE_MAX_DIGITS10; - static inline double lowest() { return -std::numeric_limits::max(); } + static inline double lowest() { return -(std::numeric_limits::max)(); } }; #endif // fallback implementation of C++11 features based on std::numeric_limits diff --git a/ofstd/include/dcmtk/ofstd/ofmem.h b/ofstd/include/dcmtk/ofstd/ofmem.h index 2d2fa574..d7a4e96d 100644 --- a/ofstd/include/dcmtk/ofstd/ofmem.h +++ b/ofstd/include/dcmtk/ofstd/ofmem.h @@ -52,7 +52,9 @@ using OFunique_ptr = std::unique_ptr; #endif #ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif diff --git a/ofstd/include/dcmtk/ofstd/ofnetdb.h b/ofstd/include/dcmtk/ofstd/ofnetdb.h deleted file mode 100644 index 5a93940e..00000000 --- a/ofstd/include/dcmtk/ofstd/ofnetdb.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * - * Copyright (C) 2012, OFFIS e.V. - * All rights reserved. See COPYRIGHT file for details. - * - * This software and supporting documentation were developed by - * - * OFFIS e.V. - * R&D Division Health - * Escherweg 2 - * D-26121 Oldenburg, Germany - * - * - * Module: ofstd - * - * Author: Jan Schlamelcher - * - * Purpose: Wrapper class for the POD struct hostent that supports - * efficient memory handling. - * - */ - -#ifndef OFNETDB_H -#define OFNETDB_H - -#include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first - -BEGIN_EXTERN_C -#ifdef HAVE_NETDB_H -#include -#endif -END_EXTERN_C - -#ifdef HAVE_WINDOWS_H -#define WIN32_LEAN_AND_MEAN -#include -#endif - -#include "dcmtk/ofstd/ofstd.h" -#include "dcmtk/ofstd/ofvector.h" -#include "dcmtk/ofstd/ofstring.h" - -/** A non-POD version of "struct hostent" for thread- and memory-safe data - * access. Wraps the contents of a "struct hostent" instance to a non-POD - * object containing RAII-style data (e.g. OFString instead of const char*). - * To handle the old pointer behavior, OFHostent objects can have an invalid - * state in which case all members are undefined. You can test whether an - * OFHostent object is invalid or not with the overloaded operators - * "operator !" and "operator OFBool". Therefore, it behaves quite the same - * way as pointers in this regard. - * @note The downside of this non-POD class is that it leads to some - * unnecessary string copy operations. The resulting performance penalty - * should be insignificant. However, implementing this class based on - * auto_ptr / unique_ptr or using c++11 move sematics would prevent that, - * if somebody thinks it is necessary. - */ -class DCMTK_OFSTD_EXPORT OFStandard::OFHostent -{ -public: - /// default constructor that creates an invalid object. - OFHostent(); - - /** test if a OFHostent object is invalid. - * @return OFTrue if the object is invalid, otherwise OFFalse. - */ - OFBool operator!() const; - - /** test if a OFHostent object is valid. - * @return OFTrue if the object is valid, otherwise OFFalse. - */ - operator OFBool() const; - - /// official name of host. - OFString h_name; - - /// a vector containing all known aliases. - OFVector h_aliases; - - /// vector containing the addresses. - OFVector h_addr_list; - - /// host address type. - int h_addrtype; - - /// the length of each address (all have the same length). - int h_length; - -private: - /// only OFStandard may instantiate a valid object. - friend class OFStandard; - - /** the constructor that "sucks out" a struct hostent instance. - * @param h the struct hostent instance to clone into this object. - */ - OFHostent(hostent* const h); - - /// internal state, OFTrue when valid. - OFBool ok; -}; - -#endif // OFNETDB_H diff --git a/ofstd/include/dcmtk/ofstd/ofpwd.h b/ofstd/include/dcmtk/ofstd/ofpwd.h index a040ac44..178f3993 100644 --- a/ofstd/include/dcmtk/ofstd/ofpwd.h +++ b/ofstd/include/dcmtk/ofstd/ofpwd.h @@ -34,7 +34,9 @@ BEGIN_EXTERN_C END_EXTERN_C #ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif diff --git a/ofstd/include/dcmtk/ofstd/ofsockad.h b/ofstd/include/dcmtk/ofstd/ofsockad.h new file mode 100644 index 00000000..4d5118f1 --- /dev/null +++ b/ofstd/include/dcmtk/ofstd/ofsockad.h @@ -0,0 +1,125 @@ +/* + * + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: ofstd + * + * Author: Marco Eichelberg + * + * Purpose: Wrapper class for struct sockaddr and related structs + * + */ + +#ifndef OFSOCKAD_H +#define OFSOCKAD_H + +#include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first +#include "dcmtk/ofstd/ofdefine.h" // for memzero() +#include "dcmtk/ofstd/ofstream.h" + +BEGIN_EXTERN_C +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#ifndef DCOMPAT_SYS_SOCKET_H_ +#define DCOMPAT_SYS_SOCKET_H_ +/* some systems don't protect sys/socket.h (e.g. DEC Ultrix) */ +#include +#endif +#endif +END_EXTERN_C + +#ifdef HAVE_WINDOWS_H +#include +#endif + +/* forward declarations */ +struct sockaddr; +struct sockaddr_in; +struct sockaddr_in6; + +/** A simple wrapper class for a struct sockaddr_storage object + * that can be used to store an TCP/IPv4 (struct sockaddr_in) or TCP/IPv6 + * (struct sockaddr_in6) address. + */ +class DCMTK_OFSTD_EXPORT OFSockAddr +{ +public: + + /// Default constructor + OFSockAddr() { clear(); } + + /// Destructor + ~OFSockAddr() { } + + /// initialize address storage object with memzero + void clear() { memzero(&sa, sizeof(sa)); } + + /** access socket address storage object as struct sockaddr (opaque address) + * @return address storage object as struct sockaddr *. + */ + struct sockaddr *getSockaddr() { return OFreinterpret_cast(struct sockaddr *, &sa); } + + /** access socket address storage object as struct sockaddr_in (IPv4 address) + * @return address storage object as struct sockaddr_in *. + */ + struct sockaddr_in *getSockaddr_in() { return OFreinterpret_cast(struct sockaddr_in *, &sa); } + + /** access socket address storage object as struct sockaddr_in6 (IPv6 address) + * @return address storage object as struct sockaddr_in6 *. + */ + struct sockaddr_in6 *getSockaddr_in6() { return OFreinterpret_cast(struct sockaddr_in6 *, &sa); } + + /** access socket address storage object as const struct sockaddr_in (IPv4 address) + * @return address storage object as const struct sockaddr_in *. + */ + const struct sockaddr_in *getSockaddr_in_const() const { return OFreinterpret_cast(const struct sockaddr_in *, &sa); } + + /** access socket address storage object as const struct sockaddr_in6 (IPv6 address) + * @return address storage object as const struct sockaddr_in6 *. + */ + const struct sockaddr_in6 *getSockaddr_in6_const() const { return OFreinterpret_cast(const struct sockaddr_in6 *, &sa); } + + /** return size of sockaddr struct depending on current protocol family + * @return size of sockaddr struct depending on current protocol family + */ + size_t size() const; + + /** get current protocol family. Returns 0 if uninitialized, AF_INET or AF_INET6 otherwise. + * @return current protocol family of the socket address. + */ + short getFamily() const { return sa.ss_family; } + + /** set current protocol family. + * @param family protocol family, should be AF_INET or AF_INET6. + */ + void setFamily(short family) { sa.ss_family = family; } + + /** set port number for current protocol family. + * Only works if the family has been set to AF_INET or AF_INET6 prior to calling this method. + * @param port port number in network byte order (e.g. output of htons()). + */ + void setPort(unsigned short port); + +private: + + /** container for the socket address structure. + * Guaranteed to be large enough for all supported protocol types. + */ + struct sockaddr_storage sa; + +}; + +DCMTK_OFSTD_EXPORT STD_NAMESPACE ostream& operator<< (STD_NAMESPACE ostream& o, const OFSockAddr& s); + +#endif // OFSOCKAD_H diff --git a/ofstd/include/dcmtk/ofstd/ofstd.h b/ofstd/include/dcmtk/ofstd/ofstd.h index 8f0ccfed..eb0aee03 100644 --- a/ofstd/include/dcmtk/ofstd/ofstd.h +++ b/ofstd/include/dcmtk/ofstd/ofstd.h @@ -51,6 +51,7 @@ END_EXTERN_C *------------------------*/ class OFFilename; +class OFSockAddr; /*---------------------* * class declaration * @@ -80,7 +81,6 @@ class DCMTK_OFSTD_EXPORT OFStandard MM_XML }; - class OFHostent; class OFGroup; class OFPasswd; @@ -972,19 +972,22 @@ class DCMTK_OFSTD_EXPORT OFStandard */ static void trimString( const char*& pBegin, const char*& pEnd ); - /** Thread-safe version of gethostbyname. - * @param name the host name. - * @return a OFStandard::OFHostent object. + /** This function performs a reverse DNS lookup of a hostname. + * The parameters are identical to those passed to gethostbyaddr(). + * If the lookup fails, an empty string is returned. + * @param addr IP address, actually a pointer to a struct in_addr or a struct in6_addr object + * @param len length of the struct pointed to by addr + * @param type address type, either AF_INET or AF_INET6 + * @return hostname for the IP address */ - static OFHostent getHostByName( const char* name ); + static OFString getHostnameByAddress(const char* addr, int len, int type); - /** Thread-safe version of gethostbyaddr. - * @param addr see manpage. - * @param len see manpage. - * @param type see manpage. - * @return a OFStandard::OFHostent object. + /** This function performs a DNS lookup of an IP address based on a hostname. + * If a DNS lookup yields multiple IP addresses, only the first one is returned. + * @param name hostname + * @param result a OFSockAddr instance in which the result is stored */ - static OFHostent getHostByAddr( const char* addr, int len, int type ); + static void getAddressByHostname(const char *name, OFSockAddr& result); /** Thread-safe version of getgrnam. * @param name the group name. diff --git a/ofstd/include/dcmtk/ofstd/ofutil.h b/ofstd/include/dcmtk/ofstd/ofutil.h index 44f6b978..b5fb575c 100644 --- a/ofstd/include/dcmtk/ofstd/ofutil.h +++ b/ofstd/include/dcmtk/ofstd/ofutil.h @@ -50,6 +50,7 @@ using OFrvalue = T; #define OFrvalue_ref(T) T&& #define OFrvalue_access(RV) RV +#define OFrvalue_ref_upcast(T, RV) static_cast(RV) #else // fallback implementations @@ -204,8 +205,19 @@ struct OFrvalue : OFrvalue_base::type * @endcode */ #define OFrvalue_ref(T) unspecified + +/** Upcast an rvalue reference to an rvalue reference of one of its bases. + * This is a helper macro for being used with DCMTK's fallback implementation + * of move semantics. C++11 rvalue references should normally allow implicit + * upcasts, therefore, this macro typically has no effect if C++11 is enabled + * (it may be used to work around the behavior of older GCC versions). + * @param T the base class to upcast to + * @param RV the rvalue reference to upcast + */ +#define OFrvalue_ref_upcast(T, RV) unspecified #else // NOT DOXYGEN #define OFrvalue_ref(T) const OFrvalue& +#define OFrvalue_ref_upcast(T, RV) OFmove(RV) #endif /** Obtain an lvalue reference from an rvalue reference. diff --git a/ofstd/include/dcmtk/ofstd/ofvriant.h b/ofstd/include/dcmtk/ofstd/ofvriant.h index 4f2bcf71..052da8b1 100644 --- a/ofstd/include/dcmtk/ofstd/ofvriant.h +++ b/ofstd/include/dcmtk/ofstd/ofvriant.h @@ -422,7 +422,6 @@ public: /** Move constructs a variant by moving the value rhs holds. * @param rhs an rvalue reference to another object of equal type. * @pre All alternatives must be move constructible. - * @note This constructor is currently only available if C++11 support was enabled. */ OFvariant( OFvariant&& rhs ); @@ -474,7 +473,6 @@ public: * is move assigned to the value contained in `*this`. * @li if `*this` and `rhs` hold different alternatives, the value contained in `*this` * is destroyed and a new one is move constructed from the value contained in `rhs`. - * @note This constructor is currently only available if C++11 support was enabled. */ OFvariant& operator=( OFvariant&& rhs ); diff --git a/ofstd/include/dcmtk/ofstd/variadic/variant.h b/ofstd/include/dcmtk/ofstd/variadic/variant.h index affcffd3..7c879588 100644 --- a/ofstd/include/dcmtk/ofstd/variadic/variant.h +++ b/ofstd/include/dcmtk/ofstd/variadic/variant.h @@ -4,7 +4,7 @@ ** ** User: jan ** Host: caesar -** Date: 2016-07-14 14:48:02 +** Date: 2017-11-16 12:31:32 ** Prog: /home/jan/scripts/make_variadic.sh ** ** Purpose: @@ -17,6 +17,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/ofstd/variadic/helpers.h" +#include "dcmtk/ofstd/ofutil.h" #include "dcmtk/ofstd/ofdiag.h" // We hide all this from doxygen, because it would only scare sane people @@ -31,23 +32,48 @@ struct OFvariant_overload : OFvariant_overload { // Let the inherited methods take part in overload resolution - using OFvariant_overload::constructor; - using OFvariant_overload::assignment; + using OFvariant_overload::copy_constructor; + using OFvariant_overload::move_constructor; + using OFvariant_overload::copy_assignment; + using OFvariant_overload::move_assignment; static Uint16 test_accepts( T0 ); static Uint8 test_accepts( ... ); + +#ifdef OFalign + static size_t copy_constructor( void* content, const T0& t0 ) + { + new (content) T0( t0 ); +#else + static size_t copy_constructor( void*& content, const T0& t0 ) + { + content = new T0( t0 ); +#endif + return Index; + } + #ifdef OFalign - static size_t constructor( void* content, const T0& t0 ) + static size_t move_constructor( void* content, OFrvalue_ref(T0) t0 ) { new (content) T0( t0 ); #else - static size_t constructor( void*& content, const T0& t0 ) + static size_t move_constructor( void*& content, OFrvalue_ref(T0) t0 ) { content = new T0( t0 ); #endif return Index; } - static bool assignment( size_t index, void* content, const T0& t0 ) + static bool copy_assignment( size_t index, void* content, const T0& t0 ) + { + if( index == Index ) + { + *static_cast( content ) = t0; + return true; + } + return false; + } + + static bool move_assignment( size_t index, void* content, OFrvalue_ref(T0) t0 ) { if( index == Index ) { @@ -76,8 +102,10 @@ struct OFvariant_overload template struct OFvariant_overload { - static void constructor(); - static void assignment(); + static void copy_constructor(); + static void move_constructor(); + static void copy_assignment(); + static void move_assignment(); template struct accepts : OFfalse_type {}; }; @@ -174,13 +202,47 @@ struct OFvariant_copy_construct_invoker #endif }; -// A functor that assigns the contents of another variant object -// that contains the same alternative (regarding the type). -struct OFvariant_assign_invoker +// A functor that does move construction from another variant +// object. +struct OFvariant_move_construct_invoker +{ + typedef void return_type; + +#ifdef OFalign + OFvariant_move_construct_invoker( void* content ) + : m_Content( content ) +#else + OFvariant_move_construct_invoker( void*& content ) + : m_pContent( content ) +#endif + { + + } + + template + void invoke( void* content ) const + { +#ifdef OFalign + new (m_Content) T( OFmove( *static_cast( content ) ) ); +#else + m_pContent = new T( OFmove( *static_cast( content ) ) ); +#endif + } + +#ifdef OFalign + void* m_Content; +#else + void*& m_pContent; +#endif +}; + +// A functor that copy assigns the contents of another variant +// object that contains the same alternative (regarding the type). +struct OFvariant_copy_assign_invoker { typedef void return_type; - OFvariant_assign_invoker( void* content ) + OFvariant_copy_assign_invoker( void* content ) : m_Content( content ) { @@ -195,6 +257,27 @@ struct OFvariant_assign_invoker void* m_Content; }; +// A functor that move assigns the contents of another variant +// object that contains the same alternative (regarding the type). +struct OFvariant_move_assign_invoker +{ + typedef void return_type; + + OFvariant_move_assign_invoker( void* content ) + : m_Content( content ) + { + + } + + template + void invoke( void* rhs ) const + { + *static_cast( m_Content ) = OFmove( *static_cast( rhs ) ); + } + + void* m_Content; +}; + // A functor that destroys the contained object. struct OFvariant_destroy_invoker { @@ -282,7 +365,19 @@ public: #else : m_pContent() #endif - , m_Index( OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::constructor( content(), t ) ) + , m_Index( OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::copy_constructor( content(), t ) ) + { + + } + + template + OFvariant( OFrvalue_ref(T) t, OFTypename OFenable_if::template accepts >::value,int>::type = 0 ) +#ifdef OFalign + : m_Content() +#else + : m_pContent() +#endif + , m_Index( OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::move_constructor( content(), t ) ) { } @@ -298,16 +393,41 @@ public: copy_construct( rhs.content() ); } + OFvariant( OFrvalue_ref(OFvariant) rhs ) +#ifdef OFalign + : m_Content() +#else + : m_pContent() +#endif + , m_Index( rhs.index() ) + { + move_construct( rhs.content() ); + } + template OFTypename OFenable_if::template accepts::value,OFvariant>::type& operator=( const T& t ) { // Either assign 't' if the contained alternative fits. - if( !OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::assignment( index(), content(), t ) ) + if( !OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::copy_assignment( index(), content(), t ) ) + { + // Or destroy the contained alternative and construct + // a new one, based on 't'. + destroy(); + m_Index = OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::copy_constructor( content(), t ); + } + return *this; + } + + template + OFTypename OFenable_if::template accepts >::value,OFvariant>::type& operator=( OFrvalue_ref(T) t ) + { + // Either assign 't' if the contained alternative fits. + if( !OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::move_assignment( index(), content(), t ) ) { // Or destroy the contained alternative and construct // a new one, based on 't'. destroy(); - m_Index = OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::constructor( content(), t ); + m_Index = OFvariant_overload<0,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>::move_constructor( content(), t ); } return *this; } @@ -320,11 +440,11 @@ public: // the same alternative if( m_Index == rhs.m_Index ) { - OFvariant_invoke + OFvariant_invoke ( m_Index, rhs.content(), - OFvariant_assign_invoker( content() ) + OFvariant_copy_assign_invoker( content() ) ); } else @@ -339,6 +459,33 @@ public: return *this; } + OFvariant& operator=( OFrvalue_ref(OFvariant) rhs ) + { + if( this != &rhs ) + { + // Do 'native' assignment if both variants contain + // the same alternative + if( m_Index == rhs.m_Index ) + { + OFvariant_invoke + ( + m_Index, + rhs.content(), + OFvariant_move_assign_invoker( content() ) + ); + } + else + { + // Destroy the contents and copy construct a new + // one + destroy(); + m_Index = rhs.m_Index; + move_construct( rhs.content() ); + } + } + return *this; + } + ~OFvariant() { // Destroy the contained object @@ -373,6 +520,17 @@ private: ); } + // Invoke move construction + void move_construct( void* rhs ) + { + OFvariant_invoke + ( + m_Index, + rhs, + OFvariant_move_construct_invoker( content() ) + ); + } + // Invoke destructor void destroy() { diff --git a/ofstd/libsrc/CMakeLists.txt b/ofstd/libsrc/CMakeLists.txt index 72b96d53..b66419ef 100644 --- a/ofstd/libsrc/CMakeLists.txt +++ b/ofstd/libsrc/CMakeLists.txt @@ -1,4 +1,4 @@ # create library from source files -DCMTK_ADD_LIBRARY(ofstd ofchrenc ofcmdln ofconapp ofcond ofconfig ofconsol ofcrc32 ofdate ofdatime oferror offile offname oflist ofstd ofstring ofthread oftime oftimer oftempf ofxml ofuuid ofmath) +DCMTK_ADD_LIBRARY(ofstd ofchrenc ofcmdln ofconapp ofcond ofconfig ofconsol ofcrc32 ofdate ofdatime oferror offile offname oflist ofstd ofstring ofthread oftime oftimer oftempf ofxml ofuuid ofmath ofsockad) DCMTK_TARGET_LINK_LIBRARIES(ofstd ${CHARSET_CONVERSION_LIBS} ${SOCKET_LIBS} ${THREAD_LIBS} ${WIN32_STD_LIBRARIES}) diff --git a/ofstd/libsrc/Makefile.dep b/ofstd/libsrc/Makefile.dep index e8e40f52..233a671f 100644 --- a/ofstd/libsrc/Makefile.dep +++ b/ofstd/libsrc/Makefile.dep @@ -116,6 +116,10 @@ ofmath.o: ofmath.cc ../../config/math.cc \ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \ ../include/dcmtk/ofstd/ofmath.h ../include/dcmtk/ofstd/oftraits.h +ofsockad.o: ofsockad.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/ofstd/ofsockad.h ../include/dcmtk/ofstd/ofdefine.h \ + ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \ + ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h ofstd.o: ofstd.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \ @@ -132,7 +136,7 @@ ofstd.o: ofstd.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/variadic/tuplefrd.h \ ../include/dcmtk/ofstd/variadic/tuple.h \ ../include/dcmtk/ofstd/diag/pop.def ../include/dcmtk/ofstd/ofmath.h \ - ../include/dcmtk/ofstd/ofnetdb.h ../include/dcmtk/ofstd/ofvector.h \ + ../include/dcmtk/ofstd/ofsockad.h ../include/dcmtk/ofstd/ofvector.h \ ../include/dcmtk/ofstd/ofgrp.h ../include/dcmtk/ofstd/ofpwd.h \ ../include/dcmtk/ofstd/ofoption.h ../include/dcmtk/ofstd/ofalign.h ofstring.o: ofstring.cc ../../config/include/dcmtk/config/osconfig.h \ diff --git a/ofstd/libsrc/Makefile.in b/ofstd/libsrc/Makefile.in index c64fac04..71e53863 100644 --- a/ofstd/libsrc/Makefile.in +++ b/ofstd/libsrc/Makefile.in @@ -18,7 +18,7 @@ LOCALDEFS = objs = oflist.o ofstring.o ofcmdln.o ofconapp.o offname.o ofconsol.o ofthread.o \ ofcond.o ofstd.o ofcrc32.o ofdate.o oftime.o ofdatime.o oftimer.o \ ofconfig.o ofchrenc.o oftempf.o ofxml.o ofuuid.o offile.o ofmath.o \ - oferror.o + oferror.o ofsockad.o library = libofstd.$(LIBEXT) diff --git a/ofstd/libsrc/ofsockad.cc b/ofstd/libsrc/ofsockad.cc new file mode 100644 index 00000000..c9e8bb78 --- /dev/null +++ b/ofstd/libsrc/ofsockad.cc @@ -0,0 +1,127 @@ +/* + * + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: ofstd + * + * Author: Marco Eichelberg + * + * Purpose: Wrapper class for struct sockaddr and related structs + * + */ + +#include "dcmtk/config/osconfig.h" /* include OS specific configuration first */ +#include "dcmtk/ofstd/ofsockad.h" +#include "dcmtk/ofstd/ofstream.h" + +BEGIN_EXTERN_C +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +END_EXTERN_C + +#ifdef HAVE_WINDOWS_H +#include +#include /* for struct sockaddr_in6 */ +#endif + +size_t OFSockAddr::size() const +{ + switch (sa.ss_family) + { + case AF_INET: + return sizeof(struct sockaddr_in); + case AF_INET6: + return sizeof(struct sockaddr_in6); + default: + return 0; + } +} + +void OFSockAddr::setPort(unsigned short port) +{ + struct sockaddr_in *si = NULL; + struct sockaddr_in6 *si6 = NULL; + switch (sa.ss_family) + { + case AF_INET: + si = getSockaddr_in(); + si->sin_port = port; + break; + case AF_INET6: + si6 = getSockaddr_in6(); + si6->sin6_port = port; + break; + default: + /* unknown protocol family, do nothing */ + break; + } +} + +DCMTK_OFSTD_EXPORT STD_NAMESPACE ostream& operator<< (STD_NAMESPACE ostream& o, const OFSockAddr& s) +{ + o << "SOCKADDR_BEGIN\n Family: "; +#ifdef _WIN32 + unsigned long bufsize = 512; +#endif + char buf[512]; + buf[0] = '\0'; + const struct sockaddr_in *si = NULL; + const struct sockaddr_in6 *si6 = NULL; + + switch (s.getFamily()) + { + case 0: + o << "not set\n"; + break; + case AF_INET: + si = s.getSockaddr_in_const(); + o << "AF_INET"; + +#ifdef _WIN32 + /* MinGW and some Visual Studio versions do not have inet_ntop() */ + WSAAddressToStringA((struct sockaddr*) si, OFstatic_cast(DWORD, s.size()), NULL, buf, &bufsize); + o << "\n IP address: " << buf; +#else + // The typecast is necessary for older MSVC compilers, which expect a non-const void * parameter. + o << "\n IP address: " << inet_ntop(AF_INET, OFconst_cast(void *, OFreinterpret_cast(const void *, &si->sin_addr)), buf, 512); +#endif + o << "\n Port: " << ntohs(si->sin_port) << "\n"; + break; + case AF_INET6: + si6 = s.getSockaddr_in6_const(); + o << " AF_INET6"; +#ifdef _WIN32 + /* MinGW and some Visual Studio versions do not have inet_ntop() */ + WSAAddressToStringA((struct sockaddr*) si6, OFstatic_cast(DWORD, s.size()), NULL, buf, &bufsize); + o << "\n IP address: " << buf; +#else + o << "\n IP address: " << inet_ntop(AF_INET6, OFconst_cast(void *, OFreinterpret_cast(const void *, &si6->sin6_addr)), buf, 512); +#endif + o << "\n Port: " << ntohs(si6->sin6_port) + << "\n Flow info: " << si6->sin6_flowinfo + << "\n Scope: " << si6->sin6_scope_id + << "\n"; + break; + default: + o << "unknown protocol: " << s.getFamily() << "\n"; + break; + } + o << "SOCKADDR_END" << OFendl; + return o; +} diff --git a/ofstd/libsrc/ofstd.cc b/ofstd/libsrc/ofstd.cc index 048e50d0..c938151f 100644 --- a/ofstd/libsrc/ofstd.cc +++ b/ofstd/libsrc/ofstd.cc @@ -98,6 +98,8 @@ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/oftuple.h" #include "dcmtk/ofstd/ofmath.h" +#include "dcmtk/ofstd/ofsockad.h" +#include "dcmtk/ofstd/ofvector.h" #define INCLUDE_CMATH #define INCLUDE_CFLOAT @@ -107,6 +109,7 @@ #define INCLUDE_UNISTD #include "dcmtk/ofstd/ofstdinc.h" + BEGIN_EXTERN_C #ifdef HAVE_SYS_STAT_H #include /* for stat() */ @@ -143,15 +146,21 @@ BEGIN_EXTERN_C #ifdef HAVE_SYS_SOCKET_H #include #endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif END_EXTERN_C #ifdef HAVE_WINDOWS_H -#include #define WIN32_LEAN_AND_MEAN +#include #include /* for GetFileAttributes() */ #include /* for _mkdir() */ #include /* for NetWkstaUserGetInfo */ - +#include /* for struct sockaddr_in6 */ #ifndef R_OK /* Windows defines access() but not the constants */ #define W_OK 02 /* Write permission */ #define R_OK 04 /* Read permission */ @@ -159,24 +168,13 @@ END_EXTERN_C #endif /* !R_OK */ #elif defined(HAVE_WINSOCK_H) - #include /* include winsock.h directly i.e. on MacOS */ -#ifdef macintosh -/* -** The WinSock header on Macintosh does not declare the WORD type nor the MAKEWORD -** macro need to initialize the WinSock library. -*/ -typedef u_short WORD; -#define MAKEWORD(a,b) ((WORD) (((a)&0xff)<<8) | ((b)&0xff) ) -#endif /* macintosh */ - #endif /* HAVE_WINDOWS_H */ #ifdef _WIN32 #include /* needed for declaration of getpid() */ #endif -#include "dcmtk/ofstd/ofnetdb.h" #include "dcmtk/ofstd/ofgrp.h" #include "dcmtk/ofstd/ofpwd.h" #include "dcmtk/ofstd/ofoption.h" @@ -2629,29 +2627,6 @@ extern "C" { #endif #endif -OFStandard::OFHostent OFStandard::getHostByName( const char* name ) -{ -#ifdef HAVE_GETHOSTBYNAME_R - unsigned int size = 128; - char* tmp = new char[size]; - hostent* res = NULL; - hostent buf; - int err = 0; - while( gethostbyname_r( name, &buf, tmp, size, &res, &err ) == ERANGE ) - { - delete[] tmp; - if( size >= MAX_NAME ) - return NULL; - tmp = new char[size*=2]; - } - OFHostent h( res ); - delete[] tmp; - return h; -#else - return OFHostent( gethostbyname( name ) ); -#endif -} - #ifdef HAVE_GETHOSTBYADDR_R #ifndef HAVE_PROTOTYPE_GETHOSTBYADDR_R extern "C" { @@ -2660,31 +2635,155 @@ extern "C" { #endif #endif -OFStandard::OFHostent OFStandard::getHostByAddr( const char* addr, - int len, - int type ) +OFString OFStandard::getHostnameByAddress(const char* addr, int len, int type) { -#ifdef HAVE_GETHOSTBYADDR_R - unsigned size = 32; - char* tmp = new char[size]; - hostent* res = NULL; - hostent buf; - int err = 0; - while( gethostbyaddr_r( addr, len, type, &buf, tmp, size, &res, &err ) == ERANGE ) + OFString result; + +#ifdef HAVE_GETADDRINFO + // We have getaddrinfo(). In this case we also presume that we have + // getnameinfo(), since both functions were introduced together. + // This is the preferred implementation, being thread-safe and protocol independent. + + struct sockaddr_storage sas; // this type is large enough to hold all supported protocol specific sockaddr structs + memzero(&sas, sizeof(sas)); + + // a DNS name must be shorter than 256 characters, so this should be enough + char hostname[512]; + hostname[0] = '\0'; + + if (type == AF_INET) + { + if (len != sizeof(struct in_addr)) return result; // invalid address length + struct sockaddr_in *sa4 = OFreinterpret_cast(sockaddr_in *, &sas); + sa4->sin_family = AF_INET; + memcpy(&sa4->sin_addr, addr, len); + } + else if (type == AF_INET6) + { + if (len != sizeof(struct in6_addr)) return result; // invalid address length + struct sockaddr_in6 *sa6 = OFreinterpret_cast(sockaddr_in6 *, &sas); + sa6->sin6_family = AF_INET6; + memcpy(&sa6->sin6_addr, addr, len); + } + else return result; // unknown network type, not supported by getnameinfo() + + int err = EAI_AGAIN; + struct sockaddr *sa = OFreinterpret_cast(struct sockaddr *, &sas); + while (EAI_AGAIN == err) err = getnameinfo(sa, sizeof(sas), hostname, 512, NULL, 0, 0); + if (hostname[0] != '\0') result = hostname; + +#elif defined(HAVE_GETHOSTBYADDR_R) + // We do not have getaddrinfo(), but we have a thread-safe gethostbyaddr_r() + + unsigned size = 1024; + char *tmp = new char[size]; + struct hostent *he = NULL; + hostent buf; + int err = 0; + while ((gethostbyaddr_r( addr, len, type, &buf, tmp, size, &he, &err ) == ERANGE) && (size < MAX_NAME)) + { + // increase buffer size + delete[] tmp; + size *= 2; + tmp = new char[size]; + } + if (he && he->h_name) result = he->h_name; + delete[] tmp; + +#else + // Default implementation using gethostbyaddr(). + // This should work on all Posix systems, but is not thread safe + // (except on Windows, which allocates the result in thread-local storage) + + struct hostent *he = gethostbyaddr( addr, len, type ); + if (he && he->h_name) result = he->h_name; + +#endif + return result; +} + + +void OFStandard::getAddressByHostname(const char *name, OFSockAddr& result) +{ + result.clear(); + if (NULL == name) return; + +#ifdef HAVE_GETADDRINFO + struct addrinfo *result_list = NULL; + int err = EAI_AGAIN; + + // filter for the DNS lookup. Since DCMTK does not yet fully support IPv6, + // we only look for IPv4 addresses. + ::addrinfo hint = {0}; + hint.ai_family = AF_INET; + + // perform DNS lookup. Repeat while we receive temporary failures. + while (EAI_AGAIN == err) err = getaddrinfo(name, NULL, &hint, &result_list); + + if ((0 == err) && result_list && result_list->ai_addr) + { + // DNS lookup successfully completed. + struct sockaddr *result_sa = result.getSockaddr(); + memcpy(result_sa, result_list->ai_addr, result_list->ai_addrlen); + } + +#else // HAVE_GETADDRINFO + +#ifdef HAVE_GETHOSTBYNAME_R + // We do not have getaddrinfo(), but we have a thread-safe gethostbyname_r() + + struct hostent *he = NULL; + unsigned bufsize = 1024; + char *buf = new char[bufsize]; + hostent ret; + int err = 0; + while ((gethostbyname_r( name, &ret, buf, bufsize, &he, &err ) == ERANGE) && (bufsize < MAX_NAME)) + { + // increase buffer size + delete[] buf; + bufsize *= 2; + buf = new char[bufsize]; + } + +#else // HAVE_GETHOSTBYNAME_R + + // Default implementation using gethostbyname(). + // This should work on all Posix systems, but is not thread safe + // (except on Windows, which allocates the result in thread-local storage) + + struct hostent *he = gethostbyname(name); + +#endif // HAVE_GETHOSTBYNAME_R + + if (he) + { + if (he->h_addrtype == AF_INET) { - delete[] tmp; - if( size >= MAX_NAME ) - return NULL; - tmp = new char[size*=2]; + result.setFamily(AF_INET); + struct sockaddr_in *result_sa = result.getSockaddr_in(); + // copy IP address into result struct + memcpy (&result_sa->sin_addr, he->h_addr, he->h_length); } - OFHostent h( res ); - delete[] tmp; - return h; -#else - return OFHostent( gethostbyaddr( addr, len, type ) ); + else if (he->h_addrtype == AF_INET6) + { + result.setFamily(AF_INET6); + struct sockaddr_in6 *result_sa = result.getSockaddr_in6(); + memcpy (&result_sa->sin6_addr, he->h_addr, he->h_length); + } + // else we have an unsupported protocol type + // and simply leave the result variable empty + } + +#ifdef HAVE_GETHOSTBYNAME_R + delete[] buf; #endif + +#endif // HAVE_GETADDRINFO + } + + #ifdef HAVE_GRP_H OFStandard::OFGroup OFStandard::getGrNam( const char* name ) { @@ -2737,39 +2836,6 @@ OFStandard::OFPasswd OFStandard::getPwNam( const char* name ) } #endif // HAVE_PWD_H -OFStandard::OFHostent::OFHostent() -: h_name() -, h_aliases() -, h_addr_list() -, h_addrtype() -, h_length() -, ok( OFFalse ) -{ -} - -OFStandard::OFHostent::OFHostent( hostent* const h ) -: h_name() -, h_aliases() -, h_addr_list() -, h_addrtype() -, h_length() -, ok(h != NULL) -{ - if( ok ) - { - h_name = h->h_name; - h_addrtype = h->h_addrtype; - h_length = h->h_length; - for( char** a = h->h_aliases; *a; ++a ) - h_aliases.push_back( *a ); - for( char** b = h->h_addr_list; *b; ++b ) - h_addr_list.push_back( OFString( *b, h_length ) ); - } -} - -OFBool OFStandard::OFHostent::operator!() const { return !ok; } -OFStandard::OFHostent::operator OFBool() const { return ok; } - #ifdef HAVE_GRP_H OFStandard::OFGroup::OFGroup() : gr_name() diff --git a/ofstd/tests/Makefile.dep b/ofstd/tests/Makefile.dep index eda86466..ad5bb066 100644 --- a/ofstd/tests/Makefile.dep +++ b/ofstd/tests/Makefile.dep @@ -279,8 +279,9 @@ tvariant.o: tvariant.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofvriant.h \ ../include/dcmtk/ofstd/variadic/variant.h \ ../include/dcmtk/ofstd/variadic/helpers.h \ - ../include/dcmtk/ofstd/ofalign.h ../include/dcmtk/ofstd/ofdiag.h \ - ../include/dcmtk/ofstd/diag/push.def \ + ../include/dcmtk/ofstd/ofalign.h ../include/dcmtk/ofstd/ofutil.h \ + ../include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/push.def \ ../include/dcmtk/ofstd/diag/cnvrsn.def \ ../include/dcmtk/ofstd/diag/vsprfw.def \ ../include/dcmtk/ofstd/diag/pop.def diff --git a/ofstd/tests/tlimits.cc b/ofstd/tests/tlimits.cc index f9c35da2..8a7161b9 100644 --- a/ofstd/tests/tlimits.cc +++ b/ofstd/tests/tlimits.cc @@ -35,8 +35,10 @@ template static void checkMinMax() { - const T max_plus_one( OFnumeric_limits::max() + 1 ); - const T lowest_minus_one( OFnumeric_limits::lowest() - 1 ); + volatile T max_plus_one( OFnumeric_limits::max() ); + volatile T lowest_minus_one( OFnumeric_limits::lowest() ); + ++max_plus_one; + --lowest_minus_one; OFCHECK ( OFnumeric_limits::max() >= max_plus_one ||